It's all about the answers!

Ask a question

item status loops


Frank Mueller (13111) | asked Jul 24, 7:51 a.m.

How can I count work item status loops?


Accepted answer


permanent link
Davyd Norris (2.6k217) | answered Jul 24, 6:47 p.m.

You're going to have to explain that a bit more I'm afraid - what do you mean? Are you talking about the number of times a work item goes back and forth through a workflow?

Frank Mueller selected this answer as the correct answer

Comments
Frank Mueller commented Jul 26, 6:25 a.m.

Yes, you are right. I am talking about the number of times an EWM work item goes back and forth through a workflow. I need a guideline or piece of script on how to integrate this into my EWM Process Configuration Source. I know how to refer on the work item status. But how to trigger the increase of a value of a capturing attribute I am not sure. Thank you in advance.


Ralph Schoon commented Jul 26, 9:39 a.m. | edited Jul 26, 9:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

There is no simple way I am aware of to implement this in the JavaScript attribute customization. The reason is, you do not know about the state transition, you only know about the current state.

You can try to have an old state attribute that has a state stored and a second that gets set with the current state. If the current state and the old state is different, you can try to set the old state to the current state. Maybe you can detect a state change that way and increase another attribute.

Absolute ugly and should not be done.


Ralph Schoon commented Jul 26, 9:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The Plain Java Client Libraries API allows to iterate the historical states and check the values.
A work item save participant/follow up action would be able to detect state changes and increase work item attribute values.

https://github.com/jazz-community/rtc-statushistory-presentation would be a potential approach As well.


Frank Mueller commented Jul 30, 9:49 a.m.

Thank you @Ralph. That sounds sufficient.

One other answer



permanent link
Davyd Norris (2.6k217) | answered Jul 27, 9:39 p.m.
edited Jul 27, 9:40 p.m.
This is not easily done in the client as JavaScript but is pretty simple to do in Report Builder, using the Work Item Status History. This gives you access to a timestamped record for every time a work item changed state, so will let you count how many times it went through each state.

My suggestion is that, instead of trying to report on it on the work item in real time, put up a widget on the dashboard that shows the information.

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.