Is there a way to build a rule to do the following:
When an issue stays in status of 'X' for 45 days, it will trigger an automation rule to move the issue back to previous status (supported by workflow transition)
Thank you!
Hello @Leslie Barrett
There is not a native field you can access to find out how many days an issue has been in a given status, nor to know what the previous status was.
You could need to write an Automation Rule (or use a workflow post function) to set a date field on the day the issue transitions into that status. You may also want another field to record the status it transitioned from, if it could transition from more than one status.
You could then write an Automation Rule to run on a daily schedule and look for issues that are in Status X where that date field is 45 days in the past, and transition the issue back to the previous status that you noted.
As @Trudy Claspill suggested, you will need to start with a scheduled trigger.
Then use below JQL to get list of issues staying in a particular status
project = TEST
AND status = X
AND status changed to X before (startOfDay(-45d) and NOT status changed after endOfDay(-1d)
You may have to tweak the query. See if this works for you,
If the query returns row, then you can fire the transition rule to move these issues back to previous status.
In my opinion this approach will avoid using a custom field. What is your opinion on this approach?
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.