How can I revert a Jira Cloud issue to its previous status using JMWE?

How can I revert a Jira Cloud issue to its previous status using JMWE?

A common request for most users is a post function that reverts an issue to the previous status in its workflow. Although JMWE can retrieve the last issue’s status, there is no direct post function in Jira Cloud to revert the issue status, as the Return to Previous Status post function is specific to JMWE for Jira Data Center.

 Instructions

The lack of the Return to Previous Status post function is due to a limitation in Jira Cloud. However, it is possible to work around this limitation using transitions that aren’t accessible to the end user:

  1. For each possible status that can be reverted, create a transition from the current to the previous status, each with the same name.

  2. Add a hidden custom field to the Jira issue, and a condition for each transition created in Step 1 that only allows the transition if it doesn’t have an empty value.

  3. Create a Shared Action that handles the post functions to revert the issue status:

    1. A Set issue fields post function that sets a value to the custom field in Step 2.

    2. A Transition issue(s) post function that transitions the issue using the transition name specified in Step 1.

    3. A Clear fields post function that clears the custom field created in Step 2.

  4. Implement the Shared Action as a post function in each transition where you’d like the issue’s status to be reverted to its previous one.

 Related articles

Feature Comparison - JMWE Data Center vs. JMWE Cloud