I would like to set the priority based on the timeline. Example: Ticket is created and its not closed after 10 days then set the priority to 3 from 4
After setting the priority 3 then wait for 4 days and 2 hrs to change the priority to 2.
Even if the ticket has not been closed then change the priority to 1 .
I guess we can do this using Automation for Jira plugin and script runner escalation service. Either Way, I need to get the JQL query to find if the ticket is 9 days 2hrs old then I will set priority 3. Can anyone help me how I can write the JQL query to get all 3 different priorities ?
I am using Jira server. I don't have Service desk installed.
Thanks,
Om
I suggest using the actual hour counts for the day ranges you want. That will avoid any issues with working day/hour calculations that Jira may do. For example for during 10 days ago from "now":
project = myProject AND created >= -240h AND created < -216h AND statusCategory != Done
As needed, you could adjust that using the startofDay() function to tune it.
Kind regards,
Bill
Hi @Bill Sheboy Thank you for the reply. I understand for 10 days from now. But how about the scenario 2.
Scenario 1 is after 10 days change the priority to 3 from 4 works with the query that you have provided.
Scenario 2 is after that 10 days again wait for another 4 days to change the priority to 2 from 3. How to write the query for 4 days after that 10 days?
Do I need to set the jql query is like startofDay(10) and 96h? Is below query work?
project = myProject AND created >= -96h AND created < startofDay(-10) AND statusCategory != Done
Thanks,
Om.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Given the complexities of your use case, one better approach would be to use a custom field for the next time frame to check rather than relying upon comparisons to the created date/time. For example, at issue create set the value to +10 days, and clear/update the field when conditions permit. (Such as for scenario 2.)
I suggest mapping out some examples and expected results, add the field, and then test your rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.