Forums

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

Automation: Rule to change workflow status

Christopher Lew January 8, 2024 edited

I'm trying to create a rule that can change the Service Request Status based on a set criteria. When the status is Canceled or Resolved, wait 7 days and then transition to Closed, as per the below Workflow.

image.png

image.png

I can filter out the results using a JQL query and only return the ones I want, below is the example I'm trying to change using the transition action.

image.png

It is from here I get stuck trying to change the status to Closed, any advise on is this the correct action to be using, and how to find the status as it isnt showing a field just as Status. Is the "Copy from trigger issue" correct, and where to find the status field to change?

image.png image.png

3 answers

1 accepted

1 vote
Answer accepted
Christopher Lew January 8, 2024

Thanks for the suggestions and assistance, I was able to greatly improve the efficiency of the scheduled task by your advice and figured out the solution to move the issues to the required status via the below screenshots. In addition rather than using the last updated field, we created an End Date field when it reached the final status and use this when looking to auto close. 

image.png

image.png

1 vote
Jack Brickey
Community Champion
January 8, 2024

Hi @Christopher Lew , welcome to the community.

A question for you, why are you declaring the issue (AG-264) in your JQL? I think the solution is much simpler than presented unless I am missing something. Below is an example. I use the Scheduled daily trigger and the key is to tick the box "Run a JQL search and...". Then your JQL, I think, would be - status in (resolved, cancelled) and type = service request and updated < startOfDay(-7)

IMG_3411.jpeg

Christopher Lew January 8, 2024

I'm selecting AG-264 just for my testing phase to see how i can change the workflow status. When deployed this condition will be removed and the updated < startOfDay(-7) will be added in.

1 vote
Trudy Claspill
Community Champion
January 8, 2024

Hello @Christopher Lew 

Welcome to the Atlassian community.

Can you show us the details of the Scheduled trigger?

What version of Jira are you using? And is it Server or Data Center?

You should not need to have a For branch within this rule. You should be able to select your issues using JQL in the Schedule trigger and then simply follow that with the Transition Issue action. The JQL in the Trigger would look like this:

project=XXX and status in (Resolved,Cancelled) and not status changed after -7d

Replace "XXX" with the name or key for your project.

For the Transition Issue action you would select the option for Selecting a specific transition

Screenshot 2024-01-08 at 4.33.02 PM.png

 

(My response is based on functionality available with Jira Data Center v9.10)

Christopher Lew January 8, 2024

I've got it to schedule once a day and then perform a JQL query, though from another response and yours  I can see i can do that in the schedule function. 

 

I believe I am using a Data Centre version, as the URL doesn't have Atlassian in it. 

 

My transition issue action doesnt have the option to change from destination status to specific transition. 

 

I'll try find the version i'm using

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events