Objective:
I'm trying to populate the members of a Jira managed Group into customfield_10031, which is a multi-user picker field.
Here's my attempt to code a JIRA Automation Rule, manually triggered on a single ticket:
{
"set": {
"customfield_10031": [
{% for member in groups['00000000-bcdd-408d-af9d-f3d7a2cf8421'].members %}
{ "name": "{{ member.key }}" }{% if not loop.last %},{% endif %}
{% endfor %}
]
}
}The ID is the ID of the group extracted from the URL in Admin / Group management. This is a Jira/Atlassian group, not another custom field.
When I run this on an issue manually, I just get this error in Automation audit log:
Error while parsing additional fields. Not valid JSON.
I then tried:
{
"set": {
"customfield_10031": {
"set": [
{
"name": "{{groups['00000000-bcdd-408d-af9d-f3d7a2cf8421'].members | map(attribute='key') | join('},{\"name\":\"') | replace(' ','')}}"
}
]
}
}
} Slightly different error:
No fields or field values to edit for issues (could be due to some field values not existing in a given project).
The field is definitely added to the screen for the issue and request type.
Help would be greatly appreciated!