My team often has documents that need to be reviewed independently by multiple people. I would like to put these documents into jira tasks, then have a "People" field called Reviewers in the task that the reporter can add all reviewers to. I then needed the automation to iterate over the list entered into this field and generate sub-tasks for each person as well as assign the sub-task to them. I have gotten it to successfully generate the proper number of sub-tasks, but it does not assign them to the users listed. However, when I check the audit log it will say that it has run successfully and that the "Issue already assigned to user." I have included my configuration below.
Hi @Benjamin Pettus and welcome to the community,
to set the assignee the accountId of the user is needed. Furthermore the forEachSmartValue acts like an iteration. So using the current value of the iteration to set the assignee will lead to success instead of using the triggerIssue.
See the screenshots below of an automation rule I tested:
Hope this was helpful.
BestStefan
@Benjamin Pettuswe use something slightly different where we have the automation assign the ticket to a reviewer or approver or whatever by a workflow step.
I've not implemented it yet in the same way you are looking for but I would think you could do it w/o using sub-tasks.
Have a multiple user picker field to collect your approvers. Use a trigger such as a Review Status (or a checkbox to trigger) so you know the issue is in review and have an automation rule that fires that will assign the issue to the first reviewer in the list. Have a loop transition that says Send to Next Reviewer for instance and have it pick the next reviewer in the list.
I use a custom user picker for each of the approval levels that only contains the users that are approved to approve for that level. Automation populates that based on who triggers the next approval to capture the actual approver.
@Stefan Salzl Yes, this worked well and was very helpful! Putting the ((ReviewersList)) in the assignee field was the game-changer. Thank you!
AWESOME!!!! Good to hear you got that working 💪💪
Hello @Stefan Salzl ,
Hope you're doing well !
I have a question regarding this automation, is there any way we can add the name of each individual approver in summary associated with their subtask.
Regards,Mayuresh Kamble
Is there any way to do this in Jira DC version 9
Automation for Jira is available in Jira DC too. tbh I‘m more familiar with the cloud version but as long as there is a forEach branch (which is the only thing I‘m not quite sure about) this should work exactly the same way.
Just give it a shot
Thanks @Stefan Salzl - There is no for each branch in the DC version, the only way to introduce iteration is through the additional fields section - But to me, looks like it support only update & fields - not any branching
@Girivasan
damnit. you are right :-/ could just re-check this. what a bummer.
Unfortunately I don´t see an easy out-of-the box solution like the one provided above. Maybe you could try to use a webRequest action and iterate within the payload.
Maybe the following links could be helpful regarding this topic:
https://community.atlassian.com/t5/Jira-questions/How-to-use-Jira-API-to-create-multiple-issues/qaq-p/918034
https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0/?_ga=2.15474545.675557620.1538152808-65270402.1526147845#api/2/issue-createIssues
It looks like you're new here. Sign in or register to get started.