How to restrict workflow transitions back to the original status?
Asked by Leon Gumba:

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?


Answers:
author: Shannon Wright
body: I just saw there is a condition that might work for you: Previous Status Condition  

![Screenshot 2024-09-20 at 10.53.30?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/348423iB5E66E2BE049E36D/image-size/large?v=v2&px=999 "Screenshot 2024-09-20 at 10.53.30?AM.png")![Screenshot 2024-09-20 at 10.53.09?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/348421i6FACBF0AD6093455/image-size/large?v=v2&px=999 "Screenshot 2024-09-20 at 10.53.09?AM.png")![Screenshot 2024-09-20 at 10.52.44?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/348422iE0B134BAE2CF3EB1/image-size/large?v=v2&px=999 "Screenshot 2024-09-20 at 10.52.44?AM.png")

comments: author: Trudy Claspill
body: 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](/t5/user/viewprofilepage/user-id/2971845) 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.


author: Leon Gumba
body: [@Shannon Wright](/t5/user/viewprofilepage/user-id/2971845) \& [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) 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.  

<br />

![Screenshot 2024-09-24 185152.png](https://community.atlassian.com/t5/image/serverpage/image-id/349046i557DB8E170A2F352/image-size/large?v=v2&px=999 "Screenshot 2024-09-24 185152.png")


Tags: cloud

jira-cloud

status

transition

workflow