It's all about the answers!

Ask a question

Getting an enumeration value in a validator script


Paul Grayem (21810) | asked Sep 17 '12, 6:38 a.m.
 I have a set of questions for a review process of which I have the values pass and fail. 

I need to be able to check the enumeration values of the questions to ensure all the questions are passed before being able too pass in onto the next state in the workflow. 

I am using the code 

If(workitem.getvalue(workitemattributes.inspection_question_1) === "review_answer.literal.l6")

However I'm not getting the required result. I have the code working for the state however am struggling accessing my custom enumeration attribute

Any ideas

One answer



permanent link
Dinesh Kumar B (4.1k413) | answered Sep 17 '12, 6:51 a.m.
JAZZ DEVELOPER
use double quotes around the enum id for getvalue
as in
workitem.getvalue("workitemattributes.inspection_question_1")

for user defined attributes, getValue works with double quotes.

hope it helps.

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.