Hello,
I am new to Jira Work Management. I'm trying to create an automation that will set priority of tasks based on due date. I have set the automation to run once per day, but it appears that to enable such scheduled automation, I need to check the "Run a JQL search and execute actions for each issue in the query" box. Once I do that, it pops up a required "JQL" field, but I am not sure what I am supposed to put into this field. I tried inserting an account ID from the drop-down, but then when I test ran the automation, it gave me an error, so maybe something else was supposed to go into this box?
Thanks for any help you can provide!
Alex
Hi @Alex Wood and welcome to the community!
Instead of using a scheduled trigger, you could use the Field Value Changed trigger so that every time an issue's Due Date field changes, it executes.
Thanks, Mark for the suggestion. I'm not sure if your solution would work as I would want the priority auto-updated as a due date approaches?
Regardless, I did some more experimenting and I now realize that JQL field is for the initial search parameters that will run each time the automation is scheduled. I had assumed that the if/else blocks would take care of this, but I guess you need a broad JQL search to kick off the process?
Anyhow, I put in "due <= 2w" in the JQL field and it seems to be happy with that. (Even though this is basically repeated in the if/else blocks???)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the additional context. If you want to share a screenshot of your rule, we can help optimize it. The query should only be required once at the trigger. I would have something like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The idea is to set priority to "highest" <1wk out, and "high" <2wk out. I've created a label ("manual") to allow people to exempt projects from this automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A minor tweak is that you could add this to your trigger query and remove from your conditions. It'll perform a little better, but otherwise, your rule looks good.
AND status != Done
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.