Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004024TestLinkTest Plan (builds, milestones, test assign)public2010-11-17 08:242011-01-22 15:11
Assigned Toamitkhullar 
PlatformOSOS Version
Product Version1.9 (Prague) 
Fixed in Version1.9.1 (bug fixing) 
Summary0004024: Add Test Case to Test Plan gives sql error on filtering the test cases on custom field value
DescriptionCreate a Test Plan
Add 5 Test Cases in it ( attached the Test Cases XML here)

Try to add these test cases in to this Test Plan by filtering Test Cases on the basis of the Field Sanity = Yes.

There is a error dump on the screen.
TagsNo tags attached.
Database (MySQL,Postgres,etc)1.9-Mysql
PHP Version
QA Team - Task Workflow Status
Attached Filestxt file icon sql.txt [^] (11,221 bytes) 2010-11-17 08:24 [Show Content]
xml file icon TestSuite-TL.xml [^] (9,386 bytes) 2010-11-17 08:25
xml file icon customFields.xml [^] (9,589 bytes) 2010-11-17 08:30
txt file icon sql2.txt [^] (206,057 bytes) 2010-11-17 09:54 [Show Content]
rar file icon 3995.rar [^] (86,059 bytes) 2010-12-10 11:53
rar file icon 4024.rar [^] (10,995 bytes) 2010-12-10 11:53

- Relationships
related to 0003995closedamitkhullar Custom Field Filters in Test case Execution : Dont Work 
parent of 0003889closedfman Add Test Cases to Test plan - Right pane shows all test cases of a test suite and does not consider test cases of filtered tree 
has duplicate 0004087closedamitkhullar Filtering Test Cases by more than one custom field gives zero results 
related to 0004115closedamitkhullar Custom Field Filters in Test case specs dont work in a corner condition 
child of 0004039closed Availables Fixes for 1.9.0 (Prague) 

-  Notes
amitkhullar (reporter)
2010-11-17 08:28

Use the attached file to first import the custom fields and assign to the project and then import the test cases
amitkhullar (reporter)
2010-11-17 09:11
edited on: 2010-11-17 09:12

Further study points an error in function BuildSkeleton in Specview.php

$parent_idx = $hash_id_pos[$current['parent_id']];

I am unable to though understand the logic been implemented here and how to fix it.
Fman may be you can throw some insight onto this.

amitkhullar (reporter)
2010-11-17 09:54

Another issue found out seems to be linked to this issue

If you try the filtering of test cases on the basis of custom field while assigning users on a test case for a build the error in sql2.txt is logged.
fman (administrator)
2010-11-17 16:52

>> Another issue found out seems to be linked to this issue
Open another issue and remove note 12622
amitkhullar (reporter)
2010-11-18 09:29


I found out the root cause for this issue

Line 620 : specview.php Fix by you for BUG ID 3889

if( is_null($targetTestCase) )
$test_spec[$idx]=null; >> This line causes a null to be set for a node which cause sql to break.
$item = null;
amitkhullar (reporter)
2010-11-18 09:43

Probably this line should be

Fman can you pelase confirm the same.
fman (administrator)
2010-11-18 09:54

I appreciate your work, but we need be able to say ' This is problem for this and that'
Till now seem you only have suspects. You need to confirm your suspected and give reason WHY what is implemented now is WRONG => need detailed explanation.
You have to explain WHY you think your change is the RIGHT thing to do
amitkhullar (reporter)
2010-11-18 10:46


The Analysis is correct and fixes the bug the only thing which I wanted was review from another pair of eyes ( Your ;-) )

What the code is doing that it is for array $test_spec trying to remove those values which are not matching the Custom Field criteria result for the test case but the mistake is in choosing the index to which the value has to be made null.

Here in this case the test case which needs to be nullified is having index 4 in array targetset from the list we get from array tcversionset
So $test_spec array needs to remove that test case value but in this array the index for this test case is 7 and the one with index 4 is an test suite
So what you code does is null the value for index 4 in it which is wrong it should rather use the test case id to null it from the array test_spec. This is what my change proposed does and works fine , I have tested the same.

Hope this makes things more clear.
amitkhullar (reporter)
2010-11-18 11:42

Checked in 1.9 trunk and cvs-head
fman (administrator)
2010-11-18 13:25

1. please use correct terms trunk does not exists on CVS -> branch.
2. note 12645 is type of details I always expect to have in order to avoid cucling again and again to understand what is happening.
Keep in mind that this is level of details requested.

If fixed on 1.9 -> we need to open isse PUBLIC and ATTACH fix here as was explained time ago
amitkhullar (reporter)
2010-12-10 11:54

Please use the fixes for both 3995 and 4024 to fix the problem for custom filters across the application. Attaching on both the issues.
fman (administrator)
2011-01-22 15:11

1.9.1 Released

- Issue History
Date Modified Username Field Change
2010-11-17 08:24 amitkhullar New Issue
2010-11-17 08:24 amitkhullar File Added: sql.txt
2010-11-17 08:25 amitkhullar File Added: TestSuite-TL.xml
2010-11-17 08:28 amitkhullar Note Added: 0012619
2010-11-17 08:30 amitkhullar File Added: customFields.xml
2010-11-17 09:11 amitkhullar Note Added: 0012620
2010-11-17 09:11 amitkhullar View Status public => private
2010-11-17 09:12 amitkhullar Note Edited: 0012620 View Revisions
2010-11-17 09:54 amitkhullar Note Added: 0012622
2010-11-17 09:54 amitkhullar File Added: sql2.txt
2010-11-17 10:14 amitkhullar Relationship added related to 0003995
2010-11-17 16:52 fman Note Added: 0012628
2010-11-18 09:29 amitkhullar Note Added: 0012640
2010-11-18 09:43 amitkhullar Note Added: 0012641
2010-11-18 09:54 fman Note Added: 0012642
2010-11-18 10:46 amitkhullar Note Added: 0012645
2010-11-18 11:42 amitkhullar Note Added: 0012648
2010-11-18 11:42 amitkhullar Status new => resolved
2010-11-18 11:42 amitkhullar Fixed in Version => 1.9.1 (bug fixing)
2010-11-18 11:42 amitkhullar Resolution open => fixed
2010-11-18 11:42 amitkhullar Assigned To => amitkhullar
2010-11-18 13:25 fman Note Added: 0012650
2010-11-23 06:30 amitkhullar Relationship added parent of 0003889
2010-12-08 11:37 fman View Status private => public
2010-12-09 06:58 amitkhullar Relationship added child of 0004039
2010-12-10 10:31 amitkhullar Relationship added has duplicate 0004087
2010-12-10 11:53 amitkhullar Status resolved => assigned
2010-12-10 11:53 amitkhullar Resolution fixed => reopened
2010-12-10 11:53 amitkhullar File Added: 3995.rar
2010-12-10 11:53 amitkhullar File Added: 4024.rar
2010-12-10 11:54 amitkhullar Note Added: 0012937
2010-12-10 11:54 amitkhullar Status assigned => resolved
2010-12-10 11:54 amitkhullar Resolution reopened => fixed
2010-12-21 11:33 amitkhullar Relationship added related to 0004115
2011-01-22 15:11 fman Note Added: 0013396
2011-01-22 15:11 fman Status resolved => closed

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker