It's all about the answers!

Ask a question

Changing Priority labels for just one work item type?


Andrew Stevens (1482529) | asked Jan 13 '12, 7:13 a.m.
I have a new custom work item type for environment change requests. For these, the Priority of the work depends purely on which environment is involved, so instead of Unassigned/Low/Medium/High I'd like the literals in the dropdown to display as Unassigned/Development/Testing/Live respectively. The other work item types' editors should be unaffected. Is this possible? Attempting to change it in the project's Type and Attributes settings gives a warning that it will "affect all Work Item types in this Project Area" since it's a built-in attribute.

At the moment I'm using a separate enumeration and attribute for the environment, which is displayed in place of the Priority in the editor's Details section. That's fine for viewing/editing the requests themselves, but means that in e.g. the "Open assigned to me" work item query results, these ones all appear with "Unassigned" in the "P" column.

Any suggestions how I might achieve this? Or even whether it's possible?


Andy.

4 answers



permanent link
Brad Veitch (11078) | answered Jan 19 '12, 10:47 p.m.
Hi Andy.

I don't think what you're trying to achieve is possible out of the box.
My suggestion would be to create an enumeration for workitemtype and populate it with values equivalent to all the work item types you've got defined. You will then need to modify each of the types to save it's equivalent value. You can then use Dependent Enumerations (see https://jazz.net/library/article/537/) to change the values displayed in Priority.

permanent link
Andrew Stevens (1482529) | answered Jan 24 '12, 7:01 a.m.
My suggestion would be to create an enumeration for workitemtype and populate it with values equivalent to all the work item types you've got defined. You will then need to modify each of the types to save it's equivalent value. You can then use Dependent Enumerations (see https://jazz.net/library/article/537/) to change the values displayed in Priority.


I see, so basically include both sets of literals in the existing Priority enumeration and use a Dependent Enumeration value set on the built-in attribute to filter the list based on the work item type?
I assume the workitemtype changes are due to the existing com.ibm.team.workitem.attribute.workitemtype Type not being an enumeration, so can't be used with Dependent Enumeration? In which case, another possibility might be a Script Based Value Set doing much the same thing - that ought to be able to keep things simpler by working with the existing Type values. Or perhaps based on the work item category (i.e. com.ibm.team.workitem.workItemType.task etc. grouping of the types, not the Filed Against attribute) if that's accessible to the javascript function...
Something for me to play around with anyway, so thanks for the ideas.


Andy

permanent link
Andrew Stevens (1482529) | answered Jan 27 '12, 6:34 a.m.
My suggestion would be to create an enumeration for workitemtype and populate it with values equivalent to all the work item types you've got defined. You will then need to modify each of the types to save it's equivalent value. You can then use Dependent Enumerations (see https://jazz.net/library/article/537/) to change the values displayed in Priority.


I see, so basically include both sets of literals in the existing Priority enumeration and use a Dependent Enumeration value set on the built-in attribute to filter the list based on the work item type?
I assume the workitemtype changes are due to the existing com.ibm.team.workitem.attribute.workitemtype Type not being an enumeration, so can't be used with Dependent Enumeration? In which case, another possibility might be a Script Based Value Set doing much the same thing - that ought to be able to keep things simpler by working with the existing Type values.

I see from https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Dependent_Enumerations_3_5 that "In RTC 3.5 ... Another addition is support for non-enumeration Attribute Dependencies. With RTC 3.5 any work item attribute can serve as value set provider for an enumeration." which presumably would allow the standard workitemtype to be used as the source without the need for either of the above workarounds.


Andrew.

permanent link
Andrew Stevens (1482529) | answered Feb 02 '12, 12:27 p.m.
My suggestion would be to create an enumeration for workitemtype and populate it with values equivalent to all the work item types you've got defined. You will then need to modify each of the types to save it's equivalent value.


Out of interest, how would you achieve that last bit? Where would you put the script to copy the equivalent values back to the original workitemtype for saving? A Script-Based Calculated Value on workitemtype, or something else?


Andy.

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.