Forums

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

Automation to change status based on priority change

anthony_butler July 1, 2019

Hi, 

I'm looking for a way to change the status of a ticket when the priority is changed. The automation rule should push the issue to the hidden status 'Change Priority'. This will then in turn trigger the SLA for the issue to be stopped and a new one started (due to the change of priority). I'd then like the automation rule to transition the issue back to the status it was when the user requested the priority change. This should happen without the end user realising or having to manually intervene in any way. 

 

Why not just have the status 'Change Priority' in the workflow and have users manually transition the issue around? Well, the answer is simple. My workflow is very complex and the priority of the issue can be changed at any time through the lifespan of it and I need a seemless change of SLA. I also have numerous users based across multiple sites and I need to ensure a high level consistency across everything. 

 

Can anyone help me out here?

2 answers

0 votes
John McKiernan
Atlassian Partner
July 7, 2019

Hey Anthony, 

sorry, this is my fault. I wasn't clear enough in my initial answer. 

In the second rule, I used the trigger 'issue created' as an example. As there hasn't actually been an issue created, it will have nothing to transition to. You will need to choose the trigger that best meets your needs here. 

The trigger would likely be either a  scheduled trigger or field value changed trigger.

Best thing to do is use a log action before the transition issue action. Log the value: {{issue.properties.last.status}}. 

Hope that helps,

Cheers,

John

0 votes
John McKiernan
Atlassian Partner
July 2, 2019

Hi Anthony,

yep this is doable with Automation for Jira though it needs a little work.

 

You will need two rules. 

 

Rule 1:

  • Field Value Changed Trigger: When priority changes
  • Add entity property on the issue (The property key should be laststatus. The property value is {{issue.status.id}}
  • Then transition the ticket to 'Change Priority'

Second rule:

  • Trigger: 
  • Transition the issue - the destination status is {{issue.properties.laststatus}} rule 1.png

rule 2.png

 

 

I hope that helps but let me know if you have any other questions!

Cheers,

John

anthony_butler July 4, 2019

Thanks for the reply @John McKiernan1 . I must admit though I'm struggling to get the second rule to work. I can easily get the issue to transition to 'Change Priority' now, but then it just sticks. I don't know if I've missed something out but nothing happens once it hits 'Change Priority'.

Automation rule.png

I see no errors in the audit log or anything?

 

I've also tried various triggers to see if it was that. So I've tried the one in the image above, but I've also tried Status=Change Priority and nothing is working. Can you help me out again please?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events