You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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!
IIRC the advanced field json you can either use `update` or `fields` https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Format-of-the-JSON
Can you try updating your JSON to
{
"update": {
"customfield_10031": {
"set": [
{
"name": "{{groups['00000000-bcdd-408d-af9d-f3d7a2cf8421'].members | map(attribute='key') | join('},{\"name\":\"') | replace(' ','')}}"
}
]
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.