The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Team-managed project automation to change Preset Approvers based on custom field

Bobby Arvanitakis
June 12, 2024

Depending on a selected "Division" custom field, with options: Group X, Group Y.
I want a specific person added as a Preset Approver.

I managed to find the customfield_10700 id that stores the approvers for that Approval step (different approvers for different statuses).

In my automation, if Division = Group X, I want to populate the Preset approver field with the reporter (as an example):

{
    "fields": {
        "customfield_10700": [
            {
                "value": "<accountid>"
            }
        ]
    }
}

Where <accountid> is the approver's account id.

In my testing, if an approver is already in this custom field and I run this automation, the current approver is removed, but the new approver isn't added. The automation runs without reported errors.

Would love some help! :)

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Bobby Arvanitakis
June 13, 2024

Figured it out!

 {"update":{"customfield_10700":[{"set":[{"accountId":"5f241224cdb7b4001bd41227"}]}]}}

 

0 votes
Bobby Arvanitakis
June 13, 2024

I've tried the following without success:

{"update":{"customfield_10700":[{"set":[{"approvers":"62b9844d268cac6e31c355ee"}]}]}}
{"update":{"customfield_10700":[{"set":[{"value":"62b9844d268cac6e31c355ee"}]}]}}

All run without errors, but the approver doesn't change.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events