How to block the transition to a new status

mel vega October 21, 2015

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

0 votes
Answer accepted
Jeremy Gaudet
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2015

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 21, 2015

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