Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005524TestLinkGeneralpublic2013-02-12 09:012013-05-26 18:50
Reportertheflasher 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSWindowsOS VersionXP Pro 2002 SP3
Product Version1.9.4 (2012 Q3 - bug fixing) 
Fixed in Version1.9.6 (2013 Q1 - bug fixing) 
Summary0005524: Creating build using test case user assignment from existing build. Newest build is not selected by default.
Descriptionwhen i try to create a build and use test case/user assignment from an existing build the newest build is not selected by default.
In my case always the second entry in the select list is selected by default.

 
Steps To Reproduce1.Enter Builds/Releases from the main window
2.Create a build
3.Check the "Copy tester assignments"- checkbox
4.The newest build should not be selected

To see this effect you must have at least 3 builds already created.
Additional InformationI tried to debug your code and it looks like the issue comes from

init_source_build_selector() in buildEdit.php.

594: // if no build has been chosen yet, select the newest build by
595: if( !$argsObj->source_build_id )
596: {
597: $htmlMenu['selected'] = key($htmlMenu['items']);
598: }

It seems that the key()-function in line 597 returns always the same value.
TagsTO BE FIXED on 2.0
Database (MySQL,Postgres,etc)MySQL
BrowserFirefox 18.0.2 , IE 8.0
PHP Version5.3.1
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Fileszip file icon testlink194org.zip [^] (59,929 bytes) 2013-02-12 09:01
jpg file icon testlinkIssue.JPG [^] (68,304 bytes) 2013-02-12 09:02

- Relationships
child of 0005406closedfman Availables hot-fixes for 1.9.5 & How To get full fixed package from gitorious 

-  Notes
(0018312)
theflasher (reporter)
2013-02-12 09:03

For better understanding you could look at the screenshot i have uploaded
(0018313)
fman (administrator)
2013-02-12 11:08
edited on: 2013-02-12 11:12

IMHO is not an issue, any guess the system can do has same value.
I do not think you always want to do is a copy of previous build.
key() returns the first key on the item set.
If you want to have a quick fix, You need to check the order used to get the build set.
If order is done DESC by build ID, I suppose the current implementation can do the requested action

(0018319)
theflasher (reporter)
2013-02-13 09:00

in fact we almost every time copy from the newest previous build.

at moment i am a little bit confused, because the comment in init_source_build_selector() says, that the newestes build will be selected.

Could you tell me where i can change the order of the build set?
I guess it must be somewhere in the config.php but i couldn't find it.

For my case i replaced
key($htmlMenu['items']);
to
$testplan_mgr->get_max_build_id($argsObj->tplan_id)

In this way the newest build is selected as default
(0018335)
fman (administrator)
2013-02-16 14:47

Part of issue origin was not using reset($htmlMenu['items']).
With reset(), combo will be created ordered by name ASC.
Change has been done to request order by id DESC on get_builds_for_html_options()
(0018336)
fman (administrator)
2013-02-16 14:53

http://gitorious.org/testlink-ga/testlink-code/commit/bb7e16911835cefbfd07deea4b8362c2760381bc [^]

- Issue History
Date Modified Username Field Change
2013-02-12 09:01 theflasher New Issue
2013-02-12 09:01 theflasher File Added: testlink194org.zip
2013-02-12 09:02 theflasher File Added: testlinkIssue.JPG
2013-02-12 09:03 theflasher Note Added: 0018312
2013-02-12 11:06 fman Description Updated View Revisions
2013-02-12 11:08 fman Note Added: 0018313
2013-02-12 11:12 fman Note Edited: 0018313 View Revisions
2013-02-13 09:00 theflasher Note Added: 0018319
2013-02-16 14:47 fman Note Added: 0018335
2013-02-16 14:49 fman Summary Issue while creating build from existing build. Newest build is not selected by default. => Creating build using test case user assignment from existing build. Newest build is not selected by default.
2013-02-16 14:49 fman Description Updated View Revisions
2013-02-16 14:52 fman Tag Attached: TO BE FIXED on 2.0
2013-02-16 14:53 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2013-02-16 14:53 fman Note Added: 0018336
2013-02-16 14:53 fman Status new => resolved
2013-02-16 14:53 fman Fixed in Version => 1.9.6 (2013 Q1 - bug fixing)
2013-02-16 14:53 fman Resolution open => fixed
2013-02-16 14:53 fman Assigned To => fman
2013-02-16 14:53 fman Relationship added child of 0005406
2013-05-26 18:50 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker