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,460,936
Community Members
 
Community Events
176
Community Groups

Automation - Update custom people field with user values from multiple people fields

I am using a Team-Managed Kanban Project.

 

Hi I am trying to use automation to update a people field based on the values from other people fields.

 

I have three fields:

  1. "Assignee" (this is the standard Jira field)
  2. "Project Team Members" this is a custom people field, and can contain multiple people.
  3. "Managers" this is a custom people field, and can contain multiple people.
  4. "All Team Members" this is a custom people field, and can contain multiple people.

 

I want to update the "All Team Members" if any of the fields in 1, 2 or 3 above are changed.  The "All Team Members" members field should then include all people from 1, 2 and 3.

I have been playing with the "Edit issue fields" Automation but haven't managed to find the correct code to make this work.

I have managed to update the "All Team Members" field with the Assignee using the code below, but that is as far as I have got.

{
"update": {
"All Team Members": [
{
"add": {"id":"{{issue.assignee.accountId}}"}
}
]
}
}

 

1 answer

0 votes

Hi @Kevin Cressy 

Just to confirm, is this board showing multiple projects, as Jira issues?  If not, why not just create user groups for static assignments?

Regarding your question...The example you showed with your JSON is adding one value, and you need to repeat the add statement as your other fields are each multi-user, list fields as smart values.

There are a few ways to do this, including:

  • Detect the fields have changed, with with the trigger or using an advanced compare condition to detect that a field has changed, and then use an advanced branch over the source field's values to add each one to "All Team Members".  Repeat this structure for all of the multi-user fields.
  • Detect the fields have changed...and then use iteration processing to add all the users by dynamically building the JSON.  You could either do this in the edit or by first creating a variable and then using the variable.  For either approach, I recommend writing your JSON to the audit log to confirm it works as you expect.

Kind regards,
Bill

Hi @Bill Sheboy - to answer your question " is this board showing multiple projects, as Jira issues?

- yes this board is a list of all projects our teams are working on.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events