It's all about the answers!

Ask a question

Enumerations wont sort with a Querie


Morten Jacobsen (3111) | asked Dec 11 '12, 9:14 a.m.

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


permanent link
Ralph Schoon (63.1k33645) | answered Dec 11 '12, 10:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Morten, I just tried that on work item query results in RTC 4.0.1 in the Web UI and the Eclipse client. It worked for me.

Please note, I think I remember there was something in previous versions. I think it was in 3.x where I saw something similar.
Morten Jacobsen selected this answer as the correct answer

Comments
Morten Jacobsen commented Dec 11 '12, 10:15 a.m. | edited Jun 10 '13, 10:10 a.m.

Yes I am using version 3.0.1 so the conclusion is that as long as I am in that then this is an bug, Thank you for the quick answer :)

One other answer



permanent link
Bill Higgins (4562523) | answered Jun 09 '13, 10:54 a.m.
JAZZ DEVELOPER
edited Jun 09 '13, 10:54 a.m.
I think it's premature to assume that this is just a bug. I can reproduce this on several environments, including Jazz.net (jazzdev.torolab).

Take for example this query for 4.0.4 stories in the RTC project area. You can't sort by "Story Points" by clicking on the column header - it is plain text and not a click target. However, if you edit the query you *can* set "Story Points" as a sort order column and it sorts... but in any particular order I could detect (Unassigned, Extra Small, Extra Large, XXL, Small, Medium, Large).

On the other hand, you *can* do a column click sort for enumerations like "Priority". If you look at the underlying process XML for priority and severity, you see something like the following:

<-- 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>

My point is that the definition of these two enumerations is almost identical in structure (e.g. integer style IDs) but you can column click sort one in the web UI and the other you can't.

I experimented quite a bit with a test RTC server to see if I could do something to make custom enumerations column-click sortable, with no luck. Here are some of the things I tried:
  • Store in both process specification and database
  • Use Derby as the database and DB2 as the database
  • Set external values for each enumeration element
Is there anything I can do to make an enumeration column-click sortable in the web UI?

Comments
Millard Ellingsworth commented Jun 10 '13, 10:35 a.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER

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. 


Millard Ellingsworth commented Jun 10 '13, 12:03 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER

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.


There does seem to be a feature-parity issue here as the Eclipse client will sort that custom enumeration on the column heading click whereas the web UI will not. Jazz is resisting my attempts to search it this morning but I presume there is an enhancement request for this.

Your answer


Register or to post your answer.