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

How can if a work item is resolved or not using javascript

I am creating a calculated value that sets a delivery status to "Late" for some condition ONLY IF the state is not resolved.


How can I check if the work item is resolved or not using javascript? Please help

if (dueDate < today && <resolution != true> )
DeliveryStatus = "Late";

0 votes

Comments

 Something like 


<attribute name="internalState"/>
<variable arguments="open or in progress" type="state"/>



One answer

Permanent link
To get the current ID of the state attribute.

  var currentstateID = workitem.getValue("internalState");


To get the current dsplaylabel of the state attribute.

  var currentstateLabel = workitem.getLabel("internalState");

Based on that information you have to decide if the work item is resolved or not.

0 votes

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
× 12,023

Question asked: Jan 30 '17, 8:31 a.m.

Question was seen: 1,501 times

Last updated: Jan 30 '17, 8:53 a.m.

Confirmation Cancel Confirm