In a workflow, we use a transition to open-status. The user can take this transition from any other status (a shared transition).
On the transition we have a scriptrunner/groovy-post-function that should set some progress-customfield to it's previous value, if, and only if, the current instance of the transition leaves from a resolved status.
I figured out how to find the previous value via ChangeHistoryManager. Simple.
But: How can the post-function detect, that the current instance of the transition leaves from a resolved status?
Background: Of course, we could just define two transitions: One from all resolved states, another one from all unresolved states. In reality, we have multiple states and multiple shared transitions and don't want to define all of them twice.
Ah, nevermind, I found a simple solution in my case:
The transitions to done-statuses sets the progress custom field to 100%.
When transitioning to a not-done status, I set the progress field back to its previous value.
But now I only do that, if it currently is at 100%.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.