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

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events