Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow transition from a status and then back to original status

Jeran Fisher January 17, 2024 edited

In Jira workflows, you have the option to make a status transitional from any status. I have a status called "Late" for when issues become late. My question, is there a way when coming back out of "Late" can I go back to the status it was in before going to "Late"?

 

Example.

 

All -> Late

Open -> Draft -> In Progress -> Review -> Approved -> Complete

 

A worker is now behind on "Review" status. Manager goes in and transitions it to "Late". When employee gets caught up, can I return it back to "Review", the status it was BEFORE going to "Late".

I know I can run individual transitions to each status back but there should be a simpler way to do this without making my workflow look crazy with transition lines going everywhere.

Is this possible?

2 answers

1 vote
Santino Lucca Castrataro
Contributor
January 17, 2024

Hi @Jeran Fisher! Yes! That can be done! I leave you here an Atlassian Community link where you can see a discussion some people have about this same topic. I remember using the same as them and I have a great result!

https://community.atlassian.com/t5/Jira-Software-questions/Automation-for-Jira-Transition-to-previous-state/qaq-p/1661089

Let me know if you need more help! 

Jeran Fisher January 17, 2024

THANK YOU!!!! I googled around and couldn't find it. Must of googled the wrong words haha.

Santino Lucca Castrataro
Contributor
January 17, 2024

Hahahaha great! I would appreciate a lot that you press the "Accept Answer" button! Thanks!!

Jeran Fisher January 17, 2024

Actually im still having problems from the link. I seem to still be in an endless loop. I can't get out of my "Late" status and get back to "Review".

 

Any more ideas?

Santino Lucca Castrataro
Contributor
January 17, 2024

Did you try saving the previous state value in an "Entity Propertie" or in an invisible custom field and then, when you want to go back, copy that value with a smart value in the "Status" section in the transition action?

0 votes
Mary from Planyway
Atlassian Partner
January 17, 2024

Hi @Jeran Fisher 
It's Mary from Planyway

In Jira, creating a dynamic transition that automatically returns an issue to its previous status (such as from "Late" back to "Review" in your example) is not natively supported as a straightforward feature. Jira workflows typically require defining explicit transitions between statuses. However, there are some approaches you can consider to achieve this functionality:

  1. Custom Scripting or Plugins: You might use advanced scripting (like ScriptRunner for Jira) or a third-party plugin that allows for more complex workflow behaviors. These tools can enable custom scripts to remember the last status before the issue moved to "Late" and automatically transition it back to that status.

  2. Conditional Transitions: Set up conditional transitions that allow an issue to move from "Late" to another status based on certain criteria. This approach can get complex and might not fully automate the process, but it can provide a more controlled way to return to a previous status.

  3. Manual Tracking: A more manual approach involves tracking the previous status in a custom field. When an issue moves to "Late," you could have a custom field that records its last status. Then, set up transitions from "Late" to possible statuses and use a condition or validator to check this custom field. This is a manual process but might work for simpler workflows.

  4. Simplified Workflow: Simplify the workflow to reduce the number of transitions. This might involve rethinking how the "Late" status is used or potentially restructuring the workflow to accommodate easier transitions.

  5. Status Category Usage: Utilize status categories effectively. For example, you might have multiple statuses that are in the same category (e.g., "In Progress"). Transitioning back to the category rather than a specific status might simplify the workflow, though it doesn't address your specific need to return to the exact previous status.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events