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,365,244
Community Members
 
Community Events
168
Community Groups

Automation rule: set multiple approvers

I have some automation in place which creates a number of related issues.  That piece works fine.

Where I am struggling is setting the approvers using 2 sources.

  1. copying from the field called "manager"
  2. hard coding a name.  for example "Bill Gates"

My code is below.  If I remove the second add block the code works.  However I do not know the syntax required to convert "Bill Gates" into what ever the Approvers field desires.

Would really love some guidance on this as I am sure this is simple.

{
"update": {
"Approvers" : [
{
"add": {
"id":"{{issue.manager.accountId}}"
}
{
"add": {
"Bill Gates"
}

}
]
}
}

 

1 answer

0 votes
Dirk Ronsmans Community Leader Aug 29, 2022

Hi @Paul Fechner ,

I believe the approvers field will expect an Array of approvers so you're missing some punctuation here.

Something like in the image below should work.

image.png

 

So going by your syntax I believe you are missing a "," between the 2 approvers.

{
"update": {
"Approvers" : [
{
"add": {
"id":"{{issue.manager.accountId}}"
},
{
"add": {
"Bill Gates"
}

}
]
}
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events