I'm having some issues with an automation that uses chron logic.
My JQL query is as follows:
project = (my project)AND issuetype in (issue types my team uses) AND status = "In Progress" AND NOT status changed AFTER 3 days.
When I run it with the correct project name and issue types, it returns 3 values. So I know the query works.
However, I am unsure of the correct Chron Expression for what I'm trying to do.
- I want to the automation to check the jql query conditions every Tuesday-Friday at 17:00 hr.
- I then want it to move the items that have been stuck in in progress for 3 days, and add a label of "Stuck".
- I then want it to move those items to "Blocked" status.
For the chron logic, I think it should be something like: 0 0 17 ? * TUE-FRI
Can anyone help troubleshoot? (See automation below)
Hi Jenny - Welcome to the Atlassian Community!
Your CRON looks correct. Is it not running at that time? Or what is the problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding to John's ideas...
Would you please post an image of the audit log?
And, looking at your JQL in the trigger, is that correct? It seems to be checking for "NOT status changed 2 minutes in the future" as the value is positive, not negative, relative to "now".
Kind regards,
Bill
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.
I had changed the log to 2 mins for testing purposes, rather than waiting till an item had been stuck in the same status for 3 days.
@Bill Sheboy and @John Funk - are you thinking that the automation is correct and the chron expression is correct, but the query is wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, Jenny.
If you expand any of those "No Actions Performed" items with Show more, I hypothesize it will show in the details that no issues were found.
Three things to check for that:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
- you are correct. Upon expanding "No Actions Performed" It says no related issues can be found.
- "Only include issues that have changed since the last time this rule executed"? is already unchecked.
- When I run a JQL filter query, it returns 2 items.
- the rule actor is set to "Automation for Jira"
I'm noticing that it doesn't seem to be running at the specified time, so is the chron logic wrong?
-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Returning to your JQL statement for a moment, did you really want to check things that have not changed for the last 2 minutes? Your original question stated 3 days.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy and @John Funk I was using 2 minutes for testing the automation rather than waiting 3 days. But yes, 3 days will be the intended time period. If the issues have been stuck in that status for 3 days when the automation runs, I want it to move those issues to blocked, and add a stuck label.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming that, and...
When testing a rule like this, you may want to use a test project and set the scheduled trigger frequency faster. That will confirm the trigger, JQL, and rule actions work as expected. Once testing is done, the schedule may be updated before the rule is copied / updated to run in the "production" project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jenny Finneran - You don't need the 2 minutes to test. Once you have updated the rule, you can click the 3 dots to the right and select Run rule. It will run the rule immediately.
But also, before then, simply run the query in the Filters/Search area to make sure something shows up first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both. I finally got it working. The chron logic was right. The details needed help.
I was able to use the run now option you showed me to get it to move the items I expected, so my expectation is that it will continue to run at the correct time going forward:
Tues through Fridays, at 17:00, on items that have been stagnant in "In Progress" for three days
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great! Glad that’s working for you now.
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.