It's all about the answers!

Ask a question

Retrieving the Work Item name from Work Item attribute in a script based calculated value


Paul Rinaldi (31149) | asked Jan 27 '14, 6:29 p.m.

I am writing a script based calculated value to retrieve the name that is chosen in the Work Item attribute and it only returns the # of the work item, not the Summary - is it possible to retrieve the summary?

var name = workItem.getValue("iteration.bps");

One answer



permanent link
Susan Hanson (1.6k2201194) | answered Jan 27 '14, 11:06 p.m.
I'm not sure I understand your question.

Do you mean that iteration.bps is based on an Enumeration and you get the enumeration Literal back instead of the Display Name associated with that Literal?  If so, then starting in 4.0, you can get getLabel() instead of getValue()
getLabel(String attributeId) (since 4.0, to get the label of an enumeration literal)

Per: https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript
Susan

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.