Hello,
I need help for scheduled Automation rules that I'm trying to run to check for issues in a specific status and how long the issue is in this status from the last time the transition occured. They will run once per day.
In fact, the idea is to be 3 separate automations writing comments in the issue notifying the client that the issue will be closed soon due to inactivity. The last rule will close the issue. Custom field checkboxes are marked to asure that one rule will not be run on the same issue again the next day. Another automation watches for customer comments to unmark checkboxes. This part works fine.
The problem is with the JQL conditions for the rules. They don't check the last time this transition was made but all of the transitions to the status specified in the issue history:
Condition for Rule 1 (transitions in 10 to 19 days ago)
status changed to "STATUS" BEFORE startOfDay(-10d) AND status changed to "STATUS" AFTER startOfDay(-19d)
Condition for Rule 2 (transitions in 20 to 29 days ago)
status changed to "STATUS" BEFORE startOfDay(-20d) AND status changed to "STATUS" AFTER startOfDay(-29d)
Condition for Rule 3 (transitions in 30+ days)
status changed to "STATUS" BEFORE startOfDay(-30d)
For example, with the first condition I get issues that were transitioned yesterday and in issue history I see they were transitioned in the past to "STATUS", so the rule will run on them. Which will be wrong.
Is there a way to add something to the JQL that shows only the last time issues were transitioned to "STATUS"?
Hope I described the task clearly.
Thanks in advance!
Welcome to community!
Could you try adding an additional clause that "not Status changed" with the day criteria of -10d in the first rule?
The idea is to ensure that the STATUS stayed the same.. Hope this helps
Hello @Fazila Ashraf
status changed to "Waiting for Confirmation" BEFORE startOfDay(-10d) AND status changed to "Waiting for Confirmation" AFTER startOfDay(-19d) AND not status changed to "Waiting for Confirmation" AFTER startOfDay(-10d)
"Waiting for Confirmation" is the desired status.
Is this what you meant? Maybe I typed it wrong. I got an error:
Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'Waiting for Confirmation'. (line 1, character 168)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dilyan Yanev , i meant like adding "AND not status changed AFTER startOfDay(-10d)" to ensure the status didnt go to any other status after the between dates of previous clause
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.
Thank you very much @Fazila Ashraf !
It seems to work now. I'll give additional feedback in the following days :)
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.