How to update one Enumeration label into another enumeration attribute using java script
Hi,
We wanted to update one enumeration attribute label into another enumeration attribute using java script.
I wanted to create calculate script to update values.
Suppose one attribute UoM has literal label "Monthly" and another enumeration attribute PDE UoM has literal label as "Monthly" then I want same label to be updated from UoM to PDE UoM attribute on Draft state of WI.
Kindly provide me the syntax to update enumeration label using java script in rtc.
Regards
Palalvi Deore
One answer
You can learn how calculated values work here: https://jazz.net/library/article/1093 Version: IBM Rational Jazz Collaborative Lifecycle Management Process Enactment Workshop for RTC .
The calculated value for the new attribute would do a workitem.getValue() or workitem.getLabel() for the original attribute ID. Then it would use an if then else section to return the correct literal ID for the new attribute.
The use case description and the reason for it is not clear. My best guess is that you want to migrate from one enumeration to another. Based on that assumption this is NOT the solution you want, as you would have to manually open all work items in the UI to make the changes to come into effect.