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

Discarding/Reversing Work Item State Changes

Since you can discard or reverse change sets, we wonder if it is possible to discard/revert work-item state changes too. Maybe an internal admin function, even invocable only through API, e.g. from History Provider?

Thanks in advance.
Cheers.

0 votes



2 answers

Permanent link

No.

And if you really think about it, the concepts don't match either. The changeset does not go away at all.

0 votes

Comments
Obviously, discarding/reversing change sets was just a naïve example to try to explain what we would be able to obtain: we have some users who would to undo last work-item state change (e.g., made for mistake) and that's not possible but maybe there is some admin internal APIs we are not aware of to undo last "transaction" of work-item state change...
Thanks in advance.
Cheers.

No, not that I am aware of. You could programmatically iterate the history of the work item to get the values and set them using the API (if the process supports it). And state changes are problematic as the reverse action night not even be available.

The API to just set a state is deprecated and since it does not use an action, it also gets unnoticed by all the process advisors.

The API to just set a state is deprecated and since it does not use an action, it also gets unnoticed by all the process advisors. 
That's could be a useful tricky, thank you! Which is the Java API method you are referring to?
Thanks in advance.
Cheers.

setState2(Identifier value)
That's working, thank you!

showing 5 of 6 show 1 more comments

Permanent link
IWorkItem  exposes a method  setState2(Identifier value)  which could be used to directly set the workflow state of a work item. However, this method is deprecated. The reason to deprecate it is most likely related to the fact that directly setting the workflow state of a work item does not respect the workflow. Essentially it would be possible to set a workflow state that is not even reachable from the current workflow state. 
luckily that's exacting what we need to create a custom client extension to discard/reverse work-item state changes.
Thank you all.
Cheers.

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,019
× 17
× 11
× 2

Question asked: Feb 16 '18, 8:14 a.m.

Question was seen: 2,961 times

Last updated: Feb 19 '18, 8:53 a.m.

Confirmation Cancel Confirm