I really like the Automation for Jira plugin, but this one is a hard nut to crack.
We wanted to update our automation rules for recurring tasks that occur every month with a group of assignees - we just added a new action to assign the new task to one assignee from the group, but the rule does not want to be executed anymore - in the option for "When rule executes..." we had selected "simply run the conditions and actions without providing issues" that is not compatible with the last action to assign the task to the group members - and the error is:
I understand we have to use the "run a JQL search and pass results to subsequent conditions and actions" and I've tried to design one that targets only the newly created scheduled task, but I am failing to come up with a proper JQL.
The result is that JQL statements, I've tried to use, produce hundreds of new tasks as I cannot limit the JQL statement to only one match - the one we want to create. I've tried smart values with dates and other tricks I can think of, googled the issue, but no luck.
Does anybody know how to craft a JQL statement that will target only the one task that is being created - or is it impossible, as the task is not created yet in that stage?
This is how the non-working rule is looking now:
Hi @janez_m
Is your rule trying to do the following:
If so, and the challenge is selecting the newly created issue, you could branch on {{createdIssue}} to assign it. Please look here for more information about that smart value.
Best regards,
Bill
Hi @Bill Sheboy
Thank you for the answer. The aim of the rule is to open a new task every month and assign it to a different member of the group.
I think I've come up with a possible solution after being away for a while. I will break the rule into two parts:
- First I will create a new unassigned task with a special label (this step I have already implemented, I will just remove the "hard-coded" part about assigning the task)
- Second I will create a new rule that will run every 10 minutes or so and check all the tasks in our project that are unassigned and have the special label - when it will find it it will assign it to one of the members of the group.
Thank you again for your reply and best regards to you too,
Janez
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Janez.
To help my understanding, what is not working/happening when you do this in one rule? I believe using {{createdIssue}} should work, and if there are multiple issues you could instead use {{createdIssues}} (note the plural) with a branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
P.S. I've also tried with a new condition after the first step, but I have the same issue how to create only one task as all the conditions I could think of produce more than one result..
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.