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 |
2 answers
![]()
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 |
![]()
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. |
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.