1
votes

Work Item has "Rank" field of string type. Usually it contains numbers only.

It is necessary to provide ability to sort work items by this field in "numeric" interpretation. For now two values are compared like this:

"100"<"60"

But it is necessary to have:

100>60

It is not critical to sort fields that have string. But if possible - usual string sorting would be good.

I see few ways to do that:

Idea1: Apply some kind of formatting to existing column in order to interpret string value as integer. I don't know if it is possible though.

Q1. Is idea1 feasible? If yes, how can I do that.

Idea2: create additional field (RankInt) and apply rule "Copy", something like "Copy 'Rank' field".

Q2: When I tried to create such rule I got an error:

TF26048: The rule 'COPY' for field 'RankInt' refers to field 'Rank', which is a different field type.

How can I do such conversion?

Thanks a lot!

P.S. TFS 2008

2
what language are you using? we cant really help you if you don't tell us!Muad'Dib
Which version of team foundation server are you using?Sean Lynch
TFS version is 2008. Muad'DibL What you mean under "language"? TFS has XML based configuration.Budda

2 Answers

2
votes

We had a similar situation where in the dev team wanted to sort the work items and see it on the report.

  1. We suggested that the dev team use the "Priority" field which is an integer field, and 2. After that change your team queries to include the "Priority" field in the columns based on which they can sort their work items,
  2. You may optionally want to customize the workitem field to limit the values needed.

This addressed their issue.

0
votes

Actually, I've added new field "RankInt" of integer type, using export to excel copied all values from "Rank" into "RankInt". On the work item UI field "Rank" was removed, "RankInt" was used instead.

Here we won't synchronize Rank and RankInt... but it is not too critical, at least for now.

If you see any other drawback, please let me know.