How to create an automation rule that loops back to the previous status without specifying?

Ellen Gruebbeling January 3, 2025

Hello! 

We have a few automation rules that are based off workflows that have steps the team follows sequentially as well as standalone steps that are used to trigger the creation of related, linked issues in related projects. 

For example, in Project XYZ, sequentially the workflow would move issues from To Do -> In Progress -> Completed. Although all issues can move to any of these statuses, these are the steps used to track the issues' statuses recognized by the team. There are also "standalone" statuses that serve the purpose of triggering automation rules to create additional issues in other projects, which the team uses to temporarily change the status of the workflow with the purpose of triggering an automation rule. For example, if an issue is in "To Do" status and then moved to "Add Issue A" status in the workflow, the automation is set to create an issue in Project A. The automation is set up so that once the issue moves to "Add Issue A" status, issue A is created in Project A and subsequent fields are set. The trigger issue in Project XYZ that was moved to the "Add Issue A" status that triggered this automation is currently set to move the trigger issue specifically to "In Progress" status based upon the automation rule configuration, regardless of the status of the issue prior to being moved to "Add Issue A."

How can the automation rule be reconfigured or set up so that the trigger issue in Project XYZ will move back to the previous workflow status, without specifically selecting or designating the status in the automation, essentially looping back to the previous status rather than a predetermined status? Is this possible?

For example, if the issue in Project XYZ started in "To Do" status and then moved to "Add Issue A" status, the automation would move it back to "To Do." But if the issue in Project XYZ was in "In Progress" status and then moved back to "Add Issue A," the rule would also allow the issue to move back to "In Progress" instead of a set status of "To Do."

I have tried to accomplish this by setting the automation rule to move the original trigger issue (after creating the related issue) back to the original status by adding the Then: "Transition the issue to:" testing with destinations set as each of the following: "copy from issue," "Same Status (loop)," and "Copy from Trigger issue." However, each time I have tested the rule with these different destinations, the trigger issue stays in "Add Issue A" status rather than reverting back to the prior status (either In Progress or To Do). 

Is it possible to set the automation so that the initial trigger issue is moved back to the previous status (To Do, In Progress, etc.) after the "Add Issue A" status? How could this be accomplished within the automation rule?

Thank you!

 

2 answers

0 votes
Mathew Lederman
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.
January 3, 2025

Two options from what I can see:


If your workflow is truly as simple as you've stated this should work:

  • If key = {{triggerissue}} and status was "In Progress"
  • Then Transition to "In progress"
  • Else Transition to "To Do"

Although, to your point, this is hard-coding the statuses,


If your open to alternatives, I would suggest using a transition to self rather than to another status. You could add a simple Post-Function to set a custom field and trigger the automation off the custom field rather than the standalone statuses. This would leave your original issue in it's original status and trigger your automation at the same time.

0 votes
Ted Nieblas
Contributor
January 3, 2025

Hello @Ellen Gruebbeling

I can think of a simpler way to achieve this. Create a Manually triggered automation and associate it with your ticket type. Instead of having to change the status of an issue to "Add Issue A", the user would execute the manual trigger via the Actions menu. I use this to create Epics in other projects and link them back to the trigger issue.

Screenshot 2025-01-03 122220.png  

This will leave your issue status unchanged as you are looking for and is a simpler automation to implement.

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