开发者

TFS: how can I create integer field based on string?

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 'R开发者_开发知识库ankInt' refers to field 'Rank', which is a different field type.

How can I do such conversion?

Thanks a lot!

P.S. TFS 2008


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜