I have multiple issues of type "X" that have a dropdown custom field called "FreelancerName"
and I want to create an issue for each unique FreelancerName value of issuetype = "X" and status = "in progress"
My current implementation:
- Trigger: Scheduled (every 2 weeks)
- filter: issuetype = "X" and status = "in progress"
- Advanced branching: for each smart value:
- Variable name: {{uniqueFreelancer}}
- Smart value: {{Issues.customfield_10154.distinct}}
- Action: Create new issue
The problem is that I cannot get it to create issues for each unique (distinct) freelancer value :(
Example:
I have 30 issues of issuetype "X" and status = "in progress"
only 5 unique FreelancerName values
I expected the automation to create 5 new issues.
Yet, it created 30 new issues
Would really appreciate your help.
and I apologies for my bad explanation of the problem.
Hello @yousefq
When you specify a JQL in the Scheduled trigger, then the actions that follow will be executed for each issue returned by that JQL.
I recommend that you take the JQL out of the trigger and instead add a Lookup Issues action to execute that JQL within the rule.
Depending on the frequency of the rule a given issue may be included in the JQL results again by subsequent executions of the rule. That could result in more issues being created than you intend.
Do you need to add some additional constraints so you don't get duplicates, like maybe a criteria to get only issues created later than the last time the rule ran?
And what if the value in the field changes, but you already created the additional issue based on the previous value? Do you want another issue created?
Hi @yousefq
Adding to Trudy's suggestions...
And then change your advanced branch to use the lookup issues as its input, iterating over the distinct values.
This assumes your custom field is a single-selection, option field.
And FYI, I note you used the plural {{issues}} smart value. That one is only supported for Jira Server and Data Center versions of automation. Please use the Lookup Issues action instead for Jira Cloud.
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.
I did leave that detail out, didn't I @Bill Sheboy ?
You always provide excellent additional details!
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.