Clicking on Case ID link for Testcase creates an undefined value error

RESOLVED FIXED

Status

Testopia
Test Cases
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: A. Grossman, Assigned: Greg Hendricks)

Tracking

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

I created a "dummy" test plan I used to try out Testopia.  I thought it looked pretty stable, so I created a real test plan.  There was no way through the interface to get rid of the "dummy" one, so I deleted it from the database.  Now the strange thing is that when I try to show the testcase for the first three testcases in my test plan, it shows the testcase without incident.  When I try viewing any of the other testcases after the third one I get the below error for that testcase number in my browser.  This is reproducable every time with the testcases 4+, but will not occur with 1-3.  I looked at my bugs.test_cases MySQL table and here is some output:

mysql> select * from test_cases where case_id='1';
+---------+----------------+-------------+-------------+-----------+-------------------+---------------------+---------
----+---------+--------+-----------+-------------------+----------------------------------+--------+
| case_id | case_status_id | category_id | priority_id | author_id | default_tester_id | creation_date | isautomated | sortkey | script | arguments | summary | requirement | alias |
+---------+----------------+-------------+-------------+-----------+-------------------+---------------------+---------
----+---------+--------+-----------+-------------------+----------------------------------+--------+
| 1 | 2 | 1 | 2 | 3 | 3 | 2006-09-19 09:54:23 | 0 | 1 | NULL | NULL | Ensure User logon | 1.2.3 A Requirement | XYZ001 |
+---------+----------------+-------------+-------------+-----------+-------------------+---------------------+---------
----+---------+--------+-----------+-------------------+----------------------------------+--------+
1 row in set (0.00 sec)

mysql> select * from test_cases where case_id='5';
+---------+----------------+-------------+-------------+-----------+-------------------+---------------------+---------
----+---------+--------+-----------+-----------------------+---------------------+--------+
| case_id | case_status_id | category_id | priority_id | author_id | default_tester_id | creation_date | isautomated | sortkey | script | arguments | summary | requirement | alias  |
+---------+----------------+-------------+-------------+-----------+-------------------+---------------------+---------
----+---------+--------+-----------+-----------------------+---------------------+--------+
| 5 | 2 | 3 | 2 | 3 | 3 | 2006-09-20 10:25:34 | 0 | 5 | NULL | NULL | Display User View | 1.2.4 A Requirement | ABC001 |
+---------+----------------+-------------+-------------+-----------+-------------------+---------------------+---------
----+---------+--------+-----------+-----------------------+---------------------+--------+
1 row in set (0.00 sec)
 

URL Attempted: http://<myserver>/bugzilla/tr_show_case.cgi?case_id=26

BROWSER OUTPUT:
Software error:

Can't call method "product_id" on an undefined value at Bugzilla/Testopia/TestCase.pm line 1006.


Reproducible: Always
(Reporter)

Comment 1

11 years ago
Workaround:

You have to go into the MySQL bugs database and **carefully** delete the "dead" test runs or test plans from these tables:

For Dead Test Runs:
delete from test_runs where run_id='X'  where X= dead testrun id.
delete from test_case_runs where run_id='X'   where X= dead testrun id.

For Dead Test Plans:
delete from test_plans where plan_id='X' where X= dead testplan id.
delete from test_case_plans where plan_id='X'  where X= dead testplan id.
(Assignee)

Comment 2

11 years ago
turn on the allowtestdeletion in the parameters and you should be able to delete test cases, plans, and runs directly within Testopia.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

11 years ago
Hi Greg,

I selected the allowtestdeletion in the Bugzilla parameters and I'm still not seeing any new buttons/links/fields to delete a run/plan/case on the Testopia pages.  Where should I expect to see it?

Also, reports aren't showing up either.  I think this was working with the earlier version of TestRunner I had installed.  Should I open a bug for this or refer to the Wiki?

Amy
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
(Assignee)

Comment 4

11 years ago
I apologize. You are right, the buttons are not yet there for deleting a test case, plan, or run. There is supporting code in some of the objects and this is still planned however. I will keep this bug open as a reminder to finish that piece. 
(Reporter)

Comment 5

11 years ago
(In reply to comment #4)
> I apologize. You are right, the buttons are not yet there for deleting a test
> case, plan, or run. There is supporting code in some of the objects and this is
> still planned however. I will keep this bug open as a reminder to finish that
> piece. 
> 

No problem.  :)  It's all part of the growing pains Testopia is experiencing right now.  Do you want some help?  I've been doing a bit of wading through the code and if you let me know which files need to be updated, I can try fixing them on my installation and tell you which lines I changed that fix it.
(Assignee)

Comment 6

11 years ago
(In reply to comment #5)
> No problem.  :)  It's all part of the growing pains Testopia is experiencing
> right now.  Do you want some help?  I've been doing a bit of wading through the
> code and if you let me know which files need to be updated, I can try fixing
> them on my installation and tell you which lines I changed that fix it.
> 

Feel free to muck around with any of the code. That is the beauty of open source. ;) The best way to submit patches is to log a bug (like this one) and attach a patch (diff -u) with your changes. I would appreciate any and all the help you can give.
(Assignee)

Comment 7

11 years ago
You can now delete test cases, runs, plans etc as of 1.1.1
Status: REOPENED → RESOLVED
Last Resolved: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.