Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to set Boolean attribute value using calculated value script

 Hi All,

I want set boolean attribute value based on the status. How to return boolean value in caluclated value script.

Appreciate your quick help.

0 votes


Accepted answer

Permanent link
Just return a boolean variable or the result of a evaluation.

For instance,

var state= workItem.getValue(WorkItemAttributes.STATE);
return (state === "3" || state === "4");
	


Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Hi @Gabriel,


I have the same requirement as Balamurugan mentioned, but i think it wont set the attribute value though it returns the state. Please correct me if i am wrong.

You are wrong. The comparison returns a boolean, the or operation on two booleans returns a boolean. You could also return true or false. SeeĀ https://www.w3schools.com/js/js_booleans.asp

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 08 '16, 5:24 a.m.

Question was seen: 2,554 times

Last updated: Jan 09 '23, 2:12 a.m.

Confirmation Cancel Confirm