How to block the transition to a new status


I created a status On Hold. but I would like to prevent the transition from a new status. Let's say I have 5 statuses: Status 1- Status 2- Status 3-Status 4 and On hold and all statuses can transition to On hold.

If the status is status 3, then I move it to On hold, when the status is not on hold anymore, I would like to bloch the transition to the new status, status 4 and make visible the status 3 only.

any idea ?



1 answer

1 accepted

This widget could not be displayed.

There are a couple of ways to do this.  Offhand, the cleanest is to put a custom field on the issue that tracks the previous status, set in a post function on the transition to On Hold, then use it (the value of that field) as a condition to block the transitions to whichever statuses were not the starting status.

The other way I can think of is to have multiple "On Hold" statuses... say, "On Hold (Status 1)", "On Hold (Status 2)", etc.  From there, each one would only be able to transition back to the source status directly.

A variation on "custom field with previous status" is to use a condition that looks at "previous status". As usual, I'd do that in the Script Runner, but the Jira Misc Workflow Extensions add-on also provides one of these off-the-shelf. There may be other add-ons that do it too.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

184 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you