Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get the "extern value" of enumerated attribute?

Apologies if this has been asked and answered many time before, but I have not been able to find the answer.

I have an enumerated type with external value
<enumeration attributeTypeId="enum_deadline_from_today" name="Deadline From Today">
                    <literal default="true" externalValue="1" icon="processattachment:/enumeration/minor.gif" id="enum_deadline_from_today.literal.l2" name="N/A" null="true"/>
                    <literal externalValue="2" icon="processattachment:/enumeration/low.gif" id="enum_deadline_from_today.literal.l4" name="12+ months"/>
                    <literal externalValue="3" icon="processattachment:/enumeration/medium.gif" id="enum_deadline_from_today.literal.l6" name="6-12 months"/>
                    <literal externalValue="4" icon="processattachment:/enumeration/high.gif" id="enum_deadline_from_today.literal.l8" name="3-6 months"/>
                    <literal externalValue="5" icon="processattachment:/enumeration/critical.gif" id="enum_deadline_from_today.literal.l10" name="0-3 months"/>
                </enumeration>

I need to get the externalValue when calculating some values (score_deadline_from_today is of type enum_....)
workItem.getValue(WorkItemAttributes.score_deadline_from_today)
doesn't seem to return the external value. How can I get it?

Many thanks

0 votes



2 answers

Permanent link
in java?  see my sample app that dump attribute values
the accepted answer here

https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes

0 votes


Permanent link
If you are doing work item attribute customization, I'm not positive that you can get the external values.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Working_with_Enumerations
Since you will get the literal values, you may need to do some mapping in your JavaScript code to translate the literal values to the corresponding external values.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,925

Question asked: Sep 23 '14, 11:58 a.m.

Question was seen: 3,338 times

Last updated: Sep 24 '14, 3:11 a.m.

Confirmation Cancel Confirm