I'm trying create an automation that will create an issue then create and assign subtasks based on information that's returned from JQL. I've got the whole automation to work including creating subtasks, but I'm running into problems assigning the subtasks because lookupIssues.assignee.accountId isn't available as a value. Any workaround ideas?
Hello @JM Hoskinson
To enable us to advise you on how to change the rule, please provide the following:
1. Screen images that show the entire rule.
2. Details of the step where you are trying to set the Assignee of the subtask
We made need to ask follow up questions after we see that data.
Here are some screenshots.
The branch loops through the items returned from the Lookup Issues action, adding the information from the Create Issues screenshot. I can't get the Assignee to fill in with the assignee from the Lookup Issues action, and, reading the documentation, it looks like LookupIssues.assignee.accountId isn't available as a returned value when you use the Lookup Issues variable.
The image you provided shows that you are using {{subtasks.assigner.accountId}}
Is that working for you?
The value you originally suggested would not work because {{lookupIssues}} is a list, and the way you used the value Jira could not tell which issue in the list you wanted to reference to get the value.
{{subtasks.assigner.accountId}} isn't working - that's the issue
Does {{subtasks.key}} work in the summary?
Have you added a log action in your loop to confirm that {{subtasks.assignee.accountId}} returns a value?
What is the output in the rule Audit Log for the step where you are trying to create the subtask?
What are the details of your For Each step?
If your For Each step looks like this, then {{subtasks.assignee.accountId}} should return a value, and will work to set the Assignee field on the new issue based on my testing.
It looks like you're new here. Sign in or register to get started.