JMWE Cloud: How to retrieve the transition details from a post-function
In some scenarios, it may be necessary to identify the transition that triggered a JMWE post function. For example, Shared actions can be used in multiple transitions, or multiple transitions can change the status of a work item from status A to status B.
Instructions
The transition object can be used to retrieve transition details.
You can obtain the workflow details using either of the following snippets of Nunjucks code:
{{transition.workflowName}} {{transition.workflowId}}For the transition details:
{{transition.transitionId}} {{transition.transitionName}}For the statuses of the work item before and after the transition (Note: both of these are objects, as documented here) :
{{transition.from_status}} {{transition.to_status}}
Due to limitations with Jira APIs, the workflow and transition names are unavailable in Event-based Actions.