It's all about the answers!

Ask a question

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

Lewis Tsao (2174862) | asked Sep 23 '14, 11:58 a.m.
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"/>

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

Many thanks

2 answers

permanent link
Donald Nong (14.5k414) | answered Sep 24 '14, 3:11 a.m.
If you are doing work item attribute customization, I'm not positive that you can get the external values.
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.

permanent link
sam detweiler (12.5k6195201) | answered Sep 23 '14, 12:32 p.m.
in java?  see my sample app that dump attribute values
the accepted answer here

Your answer

Register or to post your answer.