Get by code a deliverable type attribute
One answer
If the ID (from https://jazz.net/wiki/bin/view/Main/AttributeCustomization ) -I think it is
WorkItemAttributes.FOUND_IN
for this attribute - is used, you should get a value back.
Please note, you need to use getLabel() to get a string you can actually print. You can not access anything from the object you get with getValue(). Please read the information about the API given in the links above.
Comments
The AttributeValueSpy in https://jazz.net/library/article/1093 prints all attributes, I was able to access into the work item description.
Hi Ralph,
The attribute I'm looking for is user defined and not included in the predefined attributes such as FOUND_IN.
Here's the definition:
<customattribute <="" p="">
id="targetrelease" name="Target Release" type="deliverable"/>
<presentation <="" p="">
attributeId="targetrelease" description="Target Release" id="Target Release" kind="com.ibm.team.workitem.kind.internal.deliverable" label="Target Release"/>
It's an enumeration attribute with few user defined values.
I need a way to get its value using Script Based Calculated Value code
Thanks in advance,
Gil
you use its ID string to get the value..
attributeId="targetrelease"
Right, if it is a custom attribute the only difference is the ID you use. The wiki and the workshop are still the best source of information if you want to get started.