MantisBT - TestLink
View Issue Details
0006261TestLinkTest Specificationpublic2014-03-25 17:232014-04-25 17:38
1.9.9 (2013 Q4 - bug fixing) 
1.9.10 (2014 Q1 - bug fixing) 
0006261: Test suite 'Sort alphabetically' is not working properly
When pressing the 'Sort alphabetically' button, the test suites that start with an uppercase letter are sorted separately from the ones that start with a lowercase letter.
No tags attached.
child of 0006048closed fman Availables hot-fixes for 1.9.9 & How To get full fixed package from gitorious 
Issue History
2014-03-25 17:23tferreiraNew Issue
2014-03-25 20:31fmanNote Added: 0020619
2014-03-25 20:50tferreiraNote Added: 0020622
2014-03-25 21:30fmanNote Added: 0020629
2014-03-25 21:31fmanNote Edited: 0020629bug_revision_view_page.php?bugnote_id=20629#r3435
2014-03-25 21:32fmanNote Edited: 0020629bug_revision_view_page.php?bugnote_id=20629#r3436
2014-03-25 21:33fmanQA Team - Task Workflow Status => TBD
2014-03-25 21:33fmanPrioritynormal => low
2014-03-25 21:41fmanFixed in Version => 1.9.10 (2014 Q1 - bug fixing)
2014-03-25 21:44fmanQA Team - Task Workflow StatusTBD => READY FOR TESTING
2014-03-25 21:44fmanNote Added: 0020630
2014-03-25 21:44fmanStatusnew => resolved
2014-03-25 21:44fmanResolutionopen => fixed
2014-03-25 21:44fmanAssigned To => fman
2014-03-25 21:44fmanRelationship addedchild of 0006048
2014-04-25 17:38fmanNote Added: 0020812
2014-04-25 17:38fmanStatusresolved => closed

2014-03-25 20:31   
Please provide detailed steps to reproduce with expected result and actual result.
2014-03-25 20:50   
Steps to reproduce:

1. Select "Test Specification" link on main page
2. Create four new test suites in your project with the names: "Suite", "anotherSuite", "BasicSuite", "fakeSuite" (the order of creation is not important)
3. Select the project name in the tree-list
4. Press "Sort alphabetically" button in the "Test Suite Operations"


The expected result is: "anotherSuite", "BasicSuite", "fakeSuite", "Suite"

The actual result is: "BasicSuite", "Suite", "anotherSuite", "fakeSuite"
2014-03-25 21:30   
(edited on: 2014-03-25 21:32)
Implementation is done using nasort(), that works in this way.
(see [^])

from [^]


ASCII-code order is also called ASCIIbetical order.[46] Collation of data is sometimes done in this order rather than "standard" alphabetical order (collating sequence). The main deviations in ASCII order are:

    All uppercase come before lowercase letters, for example, "Z" before "a"
    Digits and many punctuation marks come before letters; for example, "4" precedes "one"
    Numbers are sorted naïvely as strings; for example, "10" precedes "2"

An intermediate order—readily implemented—converts uppercase letters to lowercase before comparing ASCII values. Naïve number sorting can be averted by zero-filling all numbers (e.g. "02" will sort before "10" as expected), although this is an external fix and has nothing to do with the ordering itself.

Need to understand if a better implementation exists.
(may be is simply enough to ucase() or lcase() before doing nasort())
IMHO if people choose a naming convention (Capital for first letter, or lower case for first letter) he/she has to mantain it always.

2014-03-25 21:44 [^]
2014-04-25 17:38   
1.9.10 released