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 |
Accepted answer
Ralph Schoon (63.7k●3●36●48)
| answered Feb 16 '16, 2:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
Comments
HIROAKI JOSAKO
commented Feb 16 '16, 7:14 p.m.
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.
Ralph Schoon
commented Feb 17 '16, 1:43 a.m.
| edited Feb 17 '16, 1:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
|
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.