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.