Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,607
Community Members
 
Community Events
185
Community Groups

Trying to populate a multi-user picker custom field with members of a JIRA Group

Edited
Michael Russo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 19, 2023

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!

1 answer

0 votes
Agraj Mangal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 23, 2023

Hi @Michael Russo 

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(' ','')}}"
}
]
}
}
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events