Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation rule: set multiple approvers

Paul Fechner
Contributor
August 29, 2022

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 Champion
August 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
Product Admin
TAGS
AUG Leaders

Atlassian Community Events