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

Attibute Customization for Calculated value get "status history" before save

Attibute Customization based on Script

I want to create a function to get the status at the time of storage and the status of the last of history.
Is it possible?


push Savebutton
1.history Status 1time ago
2.get saved Status last
3 diff status history Status and last Status

0 votes


Accepted answer

Permanent link
In attribute customization with JavaScript, you can only access the current status. It is not possible to access the status history. You can also only trigger on the change of an attribute. Only conditions can access the action to change the state and you can not use this information to store it.

What you can do, is to define an attribute where you store the last state and use this value and a calculated value based on the work item state, to determine that a state change has happened and what the old state was. I think it is pretty much a crutch and would rather consider to put complex behavior like that into a follow up action.
HIROAKI JOSAKO selected this answer as the correct answer

0 votes

Comments
It is not possible to get the history, we know that the purpose is not achieved. There is no technology to develop a "follow-up action". Unfortunately, I give up.

You can get the history in the Java API. I have no code for that, but the Eclipse client computes the history from the predecessor states of the work item.
You can actually create Java based follow up actions, where you can do a lot more than in the JavaScript attribute customization.

See https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ for an introduction.

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
× 6,125

Question asked: Feb 15 '16, 10:29 p.m.

Question was seen: 1,955 times

Last updated: Feb 17 '16, 1:44 a.m.

Confirmation Cancel Confirm