It's all about the answers!

Ask a question

Sort Work Item Query on a Custom Attribute


Steven Melcher (6012831) | asked Aug 11 '11, 4:07 p.m.
In RTC 2.0.0.2, is it possible to add Custom Attributes to the list of attributes to sort the results of a work item query by?

In the Web Client, I did not see the custom attributes listed as items that could be sorted on.

Comments
Todd Goldstein commented Jan 13 '12, 9:36 a.m. | edited Jul 12 '12, 4:07 p.m.

I have this same problem in 3.0.1. Any ideas on how to fix this? Is it an attribute setting when you create it or is this a defect?


John S F Lander commented Jul 12 '12, 9:58 a.m.

Have the same problem - as no response will raise an enhancement request

Accepted answer


permanent link
Millard Ellingsworth (2.5k12431) | answered Jul 12 '12, 4:54 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
edited Jul 12 '12, 7:44 p.m.
I just tried this via the Web UI in both 4.0 and 3.0.1.3 using custom attributes of type Small String and Timestamp and the custom attributes show up in the pick list for Sort Order (and I can select them and use them). The Add Sort Column picker list does not do a case insensitive sort, so if you happened to add attribute whose name begins with a lower case letter, it will show up at the bottom of the list. Since other attribute lists (like the picker for adding an attribute to an Editor Presentation) _do_ use a case insensitive sort, it seems likely that you gave up looking for the attributes because they weren't where you expected them.

I also tried with a Large String (the default type when adding a custom attribute), and that does not show up as a sort option -- which is normal, Description (a Large HTML field) doesn't show up as a sortable field either as the "Large" fields are not stored as normal database columns (so we can't sort on them).

So I think this works fine and as intended with the caveat that the attribute collection mechanism does not populate the list with a case insensitive sort (as some of the other attributes lists do).

@John Lander I see that the enhancement you filed was specifically about using the Contributor Attribute Kind and not Custom Attributes in general. I tried your example in 4.0 and don't see a Sponsor in the sort list there -- I will add comments to your work item.
Ralph Schoon selected this answer as the correct answer

3 other answers



permanent link
Ralph Schoon (63.1k33646) | answered Jul 14 '12, 9:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 I think this was not possible in 2.x

permanent link
Majdi Asaad (112) | answered Nov 14 '14, 5:10 p.m.
I have a custom attribute with type contributor. I am unable to sort on this field. I am able to sort on other custom attributes (i.e. string). I am on 5.0.0

permanent link
Bareket Matmon (1717) | answered Mar 28 '18, 9:25 a.m.

 Hi, 

I'm also trying to sort custom attribute (from type: Large HTML), but I couldn't find it in 'Sorting' list. how I can add it there? 



Comments
Jürgen Brückler commented Mar 29 '18, 8:45 a.m.

 Unfortunately Eric's answer from 2012 is still valid:
https://jazz.net/forum/questions/77851/unable-to-query-on-large-html-attributes


Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.