It's all about the answers!

Ask a question

How to set the value of custom attribute of type enumeration using javascript. ?


Suresh Raman (9152433) | asked Jan 18 '19, 3:06 p.m.
edited Jan 21 '19, 2:39 a.m. by Ralph Schoon (63.2k33646)

 I have two attributes SIT and UAT based on enumeration values (not Started, In progress and Completed).


What I am trying to achieve is when testing and UAT is complete and deployed to production and production verification fails and the workitem is reopened, the values for SIT and UAT should be set to Not started.

Any help would be much appreciated.

Thanks

Accepted answer


permanent link
Ralph Schoon (63.2k33646) | answered Jan 21 '19, 2:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 The API is explained here: https://jazz.net/wiki/bin/view/Main/AttributeCustomization enumeration type attributes can be set using setValue(enumerationliteralID). A calculated value could return the desired value or the current value. Problem is, there is no real easy way to detect the state change in the calculated value.

Suresh Raman selected this answer as the correct answer

Comments
Suresh Raman commented Jan 23 '19, 1:20 p.m.

Thanks Ralph.

One other answer



permanent link
Suresh Raman (9152433) | answered Jan 31 '19, 4:56 p.m.

 In my case, I have three calculated scripts that needs to executed when the state changes. I notice only one of them get executed. Is it the way it is supposed to work or am I doing something wrong?


Any help is much appreciated.

Thanks,
Suresh Raman


Comments
Ralph Schoon commented Feb 01 '19, 2:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The rules are explained here: https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Script_based_calculated_values


If there is no change in the attribute the calculated value depends on, there is no calculation. 

Your answer


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