How to get the value of the field against in API Javascript
![]() Im trying to develop a calculated value and i need to get the filed against but the code returns me this value: "_x88zcPohEeiberd5aDK2Yw" and the correct value is "RTC Extension Workshop"
dojo.provide("org.example.workitems.providers.filed");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); (function() { var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes; dojo.declare("org.example.workitems.providers.filed", null, { getValue: function(attributeId, workItem, configuration) { var filed = workItem.getValue(WorkItemAttributes.FILED_AGAINST); return filed; } }); })();
Any idea?
Thanks
|
Accepted answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jan 09 '19, 4:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jan 09 '19, 4:24 a.m. "_x88zcPohEeiberd5aDK2Yw" is actually the correct value. Complex items are not really supported in JavaScript attribute customization this is documented. For complex items (and all others) you can use the call getLabel() to get a human readable form.
workItem.getLabel(WorkItemAttributes.FILED_AGAINST);
Ralph Schoon selected this answer as the correct answer
|
One other answer
|
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.