index > Team Foundation Server - Work Item Tracking > Custom Work Item Types and Sort Order

Custom Work Item Types and Sort Order


I would like to create a custom work item field that has its own sort order. This would be like an enumerated type, for example:

Low
Medium
High

Alphabetically, these show up sorted as Low, High, Medium. That's not really desirable. If the user sorts in ascending order you'd like it to retain Low, Medium, High sequence. In addition, in descending order you'd like it to sort as follows: High, Medium, Low. Aside from preceding these with "1 - ", "2 - ", "3 -" is there any other way to get these custom fields to sort correctly?

Thanks,
Kevin.
Kevinbe
I guess I should add that the sort order I'm referring to involves using Team Queries.
Kevinbe

There is no other way to do this since the list values are considered as strings

Thanks

Sagar




SDET Visual Studio Team Foundation
Sagar Sura
I guess there would then only be 3 possible workarounds (of which 2 are probably acceptable and only 1 of these may be possible):

1. Generate another calculated integer value field based on the string value work item field and sort by that.
2. OR, if that's not possible, then create another field that has an integer value that represents this string field.
3. OR, since 2 is really awful because you have to keep two fields in sync (so it really isn't an option) prepend a number to each of the text values.

Is 1 possible? It would seem that that is the best work around.

Thanks,
Kevin.
Kevinbe

As far as I know we cannot have enumerated values for list items. List Item's value is just a string and hence workaround '1' is not possible. I feel workaround '3' is best bet

Thanks

Sagar




SDET Visual Studio Team Foundation
Sagar Sura
OK, I will implement option 3 then. Hopefully the next version of TFS will have support for enumerated types (and hence better sorting capability).

Thanks,
Kevin.
Kevinbe

I'm looking for a way to change the default alphabetic sorting order. For some fields, I have defined special values, like "~ Unknown ~". These should be at the end of the drop-down list and not at the beginning as they are now. Windows Explorer is sorting the same way, but good-old 'dir' sorts differently and puts all files that start with a character that have a higher ascii code than Z at the end.

For example: ~test.txt comes after Zappa.txt when using the dos dir command (same with exploreXP) but ~test.txt comes at the start of the list when using Windows Explorer and in TFS.

Is there any registry setting (on the TFS-server) that I can modify to change the way TFS sorts ?

Or is there some special character I could put in front of my special value fields to have them listed at the end ?

Thanks.

paso
From what I saw it isn't possible to change the sort order. However, in TFS SP 1 there will be support for "WIT Custom Controls" (see link below) that should allow you to display the field values in whatever sequence you'd like (in theory).

http://blogs.msdn.com/bharry/archive/2006/06/15/632236.aspx

HTH
Kevinbe
reply 8

You can use google to search for other answers

 

More Articles

Automatically Log Bugs
Add Related Work Item to different Project?
Assignment and delegation: Is teher any way to assign a WI to a G...
Set permission to some specific group to create new WI
Strange Problem --- SQL Server 2005 and TFS and Team System
TF80071 connecting MPP to Team project
How do I delte work items?
Comparing fields of a Work Item when filtering event notification
How can I know who's link to my WI??
How to create query with filter "Related to work item ...&qu...
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Custom Controls - anyone working with th…
Getting Email body part from an email us…
Work Item custom field's value update
TFS and Project Server 2003
Bug -> Details -> Found in build
How The TFS publish the build numbers us…
File Attachment Best Practice
Assign Work Item on Check-Out
Work Items created in VS 2005 do not ape…
limit control type links control to spec…
Unable to publish start/finish dates and…
Custom Work Items
Missing "Add Work Item" from &…
View history in MS Excel
Customizing the trigger of the workitem …

Hot Articles

TF54000: Error TFS Clock time advanced
getting associated changesets for work i…
WSS issue list and TFS Work Items, any i…
Error - Object reference not set to an i…
View history in MS Excel
How does the Excel application know the …
Estimate Extensibility
Witimport - Replace or add... or an easi…
Can a work item type be deleted in VSTS?
Searching work items
Making work items forms read-only for a …
Setting "CreatedBy" field prog…
How to set permissions to a field in a w…
Creating an workitem from an email
Organizing Projects into Products or Cus…

Recommend Articles

Work Item custom field's value update
Supress the "Team" Menu
How to autofill field value from other f…
getting selected item
Query Date-Time granularity
Getting the server names cached on the l…
Area not refreshed in Work Items - TFS RTM
'Custom' parameters in queries
How to change my work items?
Get List AssignedTo and Priority
Resource Names in Project empty
Get Workflow using code
How to get access to the selected workit…
Problem logging in Team Foundation Serve…
How to display Specific Revision of work…