Discarding/Reversing Work Item State Changes
2 answers
No.
And if you really think about it, the concepts don't match either. The changeset does not go away at all.
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.
https://rsjazz.wordpress.com/2012/11/26/manipulating-work-item-states/
setState2(Identifier value)
setState2(Identifier value)
That's working, thank you!
showing 5 of 6
show 1 more comments
luckily that's exacting what we need to create a custom client extension to discard/reverse work-item state changes.IWorkItem
exposes a methodsetState2(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.
Thank you all.
Cheers.