Hi all,
I'm trying to assign newly created bugs, to the guy who worked on the feature. To do so, whenever a link between bug and feature is established, I check the feature assignee and try to apply it on the bug.
A feature might have passed several departments - dev, design, localization, etc. So I have a hidden custom field that picks up every single assignee. When the bug gets linked, I get its component and compare it to the groups each assignee is part of. If they match - I got my department and exact person who needs to be assigned.
Example:
- Bug component is "design"
- My assignees are "John, Tom, Jack":
- John is in DEV team
- Top is in ProductOwner team
- Jack - in Design team
- I loop trough the assignees and compare if their ID appears in any of the groups members.
- Jack gets a match and I have his ID.
- How to assign this ID to the bug?
The issue is when I do advanced branching:
- Smart value: {{issue.customfield_11747}} - my multiple assignee field
- Value: loopAssignees
I manage to find the correct assignee, but I'm unable to assign him the bug. {{loopAssignees}} returns the user ID, but JIRA does not recognize it:
- If I use "Assign work item" both with "Specific User"=>{{loopAssignees}} or "Smart Value"=> {{loopAssignees}}, I get "Issue was already assigned to current user", which is not the case as the bug is "Unassigned"
- If I use "Edit work item" and JSON like the one below, I get "Issues edited successfully", but assignee is not changed
- Both work If I pick a random item from the list, without branching - {{issue.customfield_11747.get(1)}}. I believe its the branching that causes my assignees to loose their "type".
{
"fields": {
"assignee": {
"id": "{{loopAssignees}}"
}
}
}
Any suggestions on how to achieve this? Both on the overall logic, or specifically on how to get JIRA to understand that {{loopAssignees}} is a user ID?
Thank you!