How to restrict workflow transitions back to the original status?

Leon Gumba
Contributor
September 20, 2024

Hello Atlassian community!

I have a workflow where I can transition from 5 different statuses to a specific status (let's say Monitor), and then I can transition back to any of those 5 statuses from Monitor.

What I'd like to do is set it up so that when I transition back from Monitor, I can only move back to the specific status that I came from, not any of the other 4.

For example, if I moved an issue from In Progress to Monitor, I want the transition back to go only to In Progress, and not any of the other statuses. Is there a way to set conditions, validators, or something in the workflow settings to achieve this?

1 answer

1 accepted

3 votes
Answer accepted
Shannon Wright September 20, 2024

I just saw there is a condition that might work for you:  Previous Status Condition

Screenshot 2024-09-20 at 10.53.30 AM.pngScreenshot 2024-09-20 at 10.53.09 AM.pngScreenshot 2024-09-20 at 10.52.44 AM.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2024

I was going to make that same suggestion.

For this case if you want to limit it to the status it was in immediately before, I think you will have to do a few more changes:

I think for the transitions from Status X back to the previous status you will have to set up transitions from Status X to each of those statuses, using the Condition recommended by @Shannon Wright  to specify the appropriate previous/destination status, and checking the box for "Most recent status"

Additionally if those destination statuses support global transitions (from any status to them), you will have to eliminate those. If the global transitions are left in place the limitation on the transition from Status X can be worked around by choosing the global transition. You would need to set up non-global transitions to those statuses from other statuses in the workflow.

Like Leon Gumba likes this
Leon Gumba
Contributor
September 24, 2024

@Shannon Wright & @Trudy Claspill Hey guys, thank you so much! I was able to solve this with your help.

You were absolutely right, I needed to use the Previous Status Condition. I actually found it myself initially, but I misused it by applying it to transitions going to the Monitor status. As Trudy pointed out, I actually needed to set these conditions for transitions from the Monitor status, not to it. Now it works perfectly!

And yes, I also needed to check that "Most recent status only" checkbox. For example, as you can see in this screenshot, when I move an issue from Backlog to Monitor and then want to transition the issue from Monitor, the workflow detects the most recent status (which is Backlog) and restricts me to transitioning the issue only back to Backlog, even though my workflow technically allows transitions to other statuses from Monitor.


Screenshot 2024-09-24 185152.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events