How to block the transition to a new status

Hi

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 ?

thanks

Melissa

1 answer

1 accepted

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

474 views 1 18
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