Forums

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

Change the priority based on dates on an everyday basis

Lakshmi CH
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.
July 8, 2020

Hi Team,

 How to put these rules into some script that would run automatically on an everyday basis? And if the ticket was created and is still in open status, then the script runs and updates the priority based on what date is it now.

For example, I created the ticket and need by date also today date, and I did not work on the ticket and it is still in open status (Priority is Major, if the Need By date is today), and tomorrow the script will run automatically and update the priority to Critical (Need By Date is past date) based on the below conditions.

Here Need By Date is date field.

  • If issuetype in (Bug, "Change Request") AND Need By Date is a date in the past then set Priority=Critical.
  • If issuetype in (Bug, "Change Request") AND Need By Date is today then set Priority=Major.
  • If issuetype in (Bug, "Change Request") AND "Escalation?" = No AND Need By Date is in the future then set Priority=Minor.

1 answer

3 votes
Bill Sheboy
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.
July 8, 2020

Hi @Lakshmi CH 

You could use automation rules to do those escalations of priority, if you have the automation add-on for your server instance.  Please look here for more information:

https://www.atlassian.com/software/jira/features/automation

As an example rule, you would have:

  • Trigger: scheduled to run once per day
  • Branch: JQL to find issues for which: project = myProject AND issueType IN (bug, "Change Request") AND "Need By Date" >= startOfToday() AND "Need By Date" <= endOfToday() AND Priority = some lower value
    • Action: for each issue, edit to change the Priority = Critical

If you do not have the add-on, you could instead create filters for the conditions, subscribe to them for visibility, and manually bulk update the issues once per day to escalate priority.

 

Best regards,

Bill

Lakshmi CH
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.
July 10, 2020

Thank you @Bill Sheboy for your response. We will look into this.

Like Bill Sheboy likes this
Chris K
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.
August 31, 2023

This worked for me as well with a similar case. Thanks for the hint @Bill Sheboy :)

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer