Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003478TestLinkTest Executepublic2010-05-20 09:152010-08-31 20:29
Assigned Tofman 
PlatformOSOS Version
Product Version1.9 Beta 3 
Fixed in Version1.9 Beta 5 
Summary0003478: Testcase ID not updated when using save and move next
DescriptionWhen executing a testcase and clicking the button "Save and move to next", Testlink saves the results and automatically opens the next testcase.
However the testcase ID is not updated. This leads to inconsistent behaviour, for example custom fields are not displayed for the new testcase, because the array which contains the custom fields still uses the old testcase ID.
Steps To ReproduceCreate a testplan with at least two testcases (Case1 and Case2). Execute Case1 and click "Save and move to next". You will be redirected to the execution page for Case2, however the data array still contains the ID for Case1.

To visualize the problem you can for example add a "var_dump($argsObj->id);" in the function processTestCase() in lib/execute/execSetResults.php. If you click on Case1 in the tree on the left side, you'll see the ID of Case1 on the top of the page. If you click on Case2 in the tree, you'll see the ID of Case2 on the top of the page. So far so good.
But if you execute Case1 with "Save and move to next", you'll see Case2 with the ID of Case1 on the top of the page.
Additional InformationI believe the root of this problem is the function init_args() in lib/execute/execSetResults.php, which retrieves the testcase ID via "$args->tc_id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : null;"
But when executing a testcase $_REQUEST contains the ID of the just executed test, and not of the next testcase that was opened.

It would be nice if someone could verify this problem. The changelog of Testlink 1.9 Beta 4 did not mention anything regarding this problem.
TagsNo tags attached.
Database (MySQL,Postgres,etc)
PHP Version
QA Team - Task Workflow Status
Attached Fileszip file icon [^] (42,603 bytes) 2010-05-21 07:46

- Relationships

-  Notes
fman (administrator)
2010-05-20 19:50

Please use attached fix, retest and give us feedback
twelve (reporter)
2010-05-21 07:37

Can you tell me in what revision of lib/functions/testplan.class.php you fixed this bug? I cannot find any reference.

I just patched lib/execute/execSetResults.php with your fix and it works, however there's a small bug in line 1186: The 4th parameter of $tcaseMgr->html_table_of_custom_field_inputs should be "_{$tcase_id}" and not "_{$argsObj->id}"
fman (administrator)
2010-05-21 07:45
edited on: 2010-05-21 07:46

Ok I've fixed and commited to CVS, and uploaded new fix.
The fix has two parts:
1. on execSetResults.php, I've added a new argument to processTestCase() and add a second call after getting the nextItem
2. I've found a bug on method responsible of getting sibbling.

Just For the records: normally we put short comments on files touched, with references to methods changed, this can be useful for you in future

fman (administrator)
2010-08-31 20:29

Release BETA 6 - 20100831

- Issue History
Date Modified Username Field Change
2010-05-20 09:15 twelve New Issue
2010-05-20 13:21 fman Assigned To => fman
2010-05-20 13:21 fman Status new => assigned
2010-05-20 19:49 fman File Added:
2010-05-20 19:50 fman Note Added: 0010090
2010-05-20 19:50 fman Status assigned => feedback
2010-05-21 07:37 twelve Note Added: 0010099
2010-05-21 07:37 twelve Status feedback => assigned
2010-05-21 07:45 fman Note Added: 0010100
2010-05-21 07:45 fman File Deleted:
2010-05-21 07:46 fman File Added:
2010-05-21 07:46 fman Note Edited: 0010100 View Revisions
2010-05-21 07:46 fman Status assigned => resolved
2010-05-21 07:46 fman Fixed in Version => 1.9 Beta 5
2010-05-21 07:46 fman Resolution open => fixed
2010-08-31 20:29 fman Note Added: 0011188
2010-08-31 20:29 fman Status resolved => closed

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker