Desired situation:
on Github someone adds 1 or more people as reviewers to a PR, I want this to reflect in the Jira ticket
What already works:
- I get the correct issue from the PR titlte
- I can add a single reviewer
What doesn't work:
I cannot add multiple reviewers.
I have a lookup table to map github username to jira user id, which works for single users just fine. But I can't get it to work for multiple users, I tried:
- Just putting the whole array in the LUT `{{githubToJiraUsers(webhookData.pull_request.requested_reviewers.login)}}`
- Putting single values in the LUT `{{#githubToJiraUsers(webhookData.pull_request.requested_reviewers}}{{githubToJiraUsers({{login}})}}{{/}}`
- Use the for-each functionality of automation to update a variable
- Use the for-each functionality to update the issue directly with the current reviewer (removes the current reviewers already in the Issue AND only adds the last one)
- Use the for-each to do advanced field updating with JSON and use "update" (cannot get this to work)
Two of my many JSON attempts:
{
"update": {
"reviewers": {
"update": {{githubToJiraUser(login)}}
},
},
} and
{
"update": {
"reviewers": [{
"add": "{{githubToJiraUser(login)}}"
}],
},
Json attempt:

Attempt with smart values list

I tried the smart value list in 2 ways:

These re the logs of those 2:

If anyone has any ideas how to approach this, help is greatly appreciated.
11-01-2024: (edited with screenshots)