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

0 votes
Accepted answer

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
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,947 views 19 22
Read article

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