Enumerations wont sort with a Querie
When running a Querie in Rational Team Concert (RTC) i wont sort the result based on the values in the Enumerations, if I then in the view press the header (sorting by header) then it sort just fine.... anyone experianced this as well, anyone have a solutions for this?
My enumerations is the numbers from 1 to 20 and an "undefined" and they are sorted in the enumerations setting and when I select it from the drop down.
Accepted answer
Please note, I think I remember there was something in previous versions. I think it was in 3.x where I saw something similar.
One other answer
<-- Priority --><enumeration attributeTypeId="priority" name="priority"><literal default="true" icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/priority_unassign.gif" id="1" name="Unassigned"/><literal icon="platform:/plugin/com.ibm.team.workitem.common/icons/obj16/priority_low.gif" id="2" name="Low"/></enumeration>
<!-- Story points --><enumeration attributeTypeId="complexityEnum" name="complexityEnum"><literal default="true" id="0" name="Unassigned" null="true"/><literal id="1" name="Extra Small (1)"/></enumeration>
- Store in both process specification and database
- Use Derby as the database and DB2 as the database
- Set external values for each enumeration element
Comments
While I agree that the sort order for your query using Story Points seems odd, FBOW, it's a standard string sorting based on the IDs of the items in the enumeration. If you look at the (story point value), using a string sort, "13" comes before "20", "20" comes before "3". Since we translate into other languages, we don't sort based on the name/literal. It would be useful if these were treated as numbers for sorting as the current sorting creates this ranking: 0, 1, 13, 20, 200, 3, 5, 8, 80.
As to the other issue, Mort's case is different than yours. As I read it, he was concerned about initially sorting the query on a custom value and this works fine (at least in 4.x). I think Mort and Ralph came to the right conclusion on that case.