Forums

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

Add Approvers to custom field using JSON

Deleted user February 26, 2023

When the approvers field is updated, I am trying to automatically add those users to the existing custom field (as it may already contain some users and I want to preserve them, and just add on them)

Be aware, both fields are multi-user fields.

2 answers

1 accepted

0 votes
Answer accepted
Deleted user February 28, 2023

1 vote
Tansu Akdeniz
Community Champion
February 27, 2023

Hi @[deleted] 

You can check "Add to existing values" and copy from another field within issue.

copy.png

ps: For json update method, please check Advanced field editing page 

Sample one with add;

{
"update": {
"customfield_xxxxx" : [
{
"add": {
xxxxxxxx
}
}
]
}
}
Deleted user February 27, 2023

Hi Tansu, trying

{
"update": {
"customfield_10561" : [
{
"add": {
"issue.approvers" : [
]}
}
]
}
}

gets me the following error, 
Field 'customfield_10561' cannot appear in both 'fields' and 'update')

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events