Edit - Tried to format code block
We are currently trying to set an array of users that are in an attribute in an asset object as approvers.
The "add" operator doesn't seem to work as the following doesn't not add any users but seems to be valid Json. Even if we tried to set a single attribute field with those array of users, it doesnt populate.
Doesnt work
{
"update": {
"Approvers": [
{
"add": {{issue.customfield_10936.Owned By.flatten.asJsonObjectArray("accountId")}},
"add": {{issue.customfield_10936.Alternate Approver.flatten.asJsonObjectArray("accountId")}}
}
]
}
}Doesnt work
{
"update": {
"Approvers": [
{
"add": {{issue.customfield_10936.Owned By.flatten.asJsonObjectArray("accountId")}}
}
]
}We have also tried the following with the "field" but this is invalid Json
{ "fields":
{
"Approvers": {{issue.customfield_10936.Owned By.flatten.asJsonObjectArray("accountId")}},
{{issue.customfield_10936.Alternate Approver.flatten.asJsonObjectArray("accountId")}}
}
}If we do just a single attribute field it works
{
"fields": {
"Approvers": {{issue.customfield_10936.Owned By.flatten.asJsonObjectArray("accountId")}}
}
}
I found a similar community post, but it doesn't deal with an array of users
https://community.atlassian.com/t5/Jira-Service-Management/Adding-Multiple-users-for-Approval-with-automation/qaq-p/1726767#U2580784
Does the add operator still work for approvers? Any suggestions on how to get this to work?