Forums

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

How to add an approver with an automation based on a people field in a TMP?

sergio.peschiera
Contributor
September 22, 2022

I have an approver field and I want to add an approval based on a custom field called 'Head of Department'. However, when trying to make this run through an automation, it results in an error.

This is the code I've tried using to achieve this (since the approval field does not appear in the list of available fields):

{
"update": {
"Department Head": [
{
"add": {"id": {{customfield_12779.accountid}}}
}
]
}
}

1 answer

0 votes
Ward DIJKHUIS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2022

Hi Sergio, I think the main thing you should do is investigate why the custom field is not showing up in the list instead of using the code you posted.

 

Have you set up the context to be project specific for the approval field? There is a bug that will prevent a field from showing when a field context is set. Could you try setting Custom Field Context of the field to Global instead of any project or remove the context.

sergio.peschiera
Contributor
September 22, 2022

Hey Ward,

Thanks for your reply. I don't think that's how an approver field is set in a team managed project. I just set it in the workflow status. I have managed to edit that field through a similar coding as the one shared above, only that I've only succeeded when providing the exact user ID. the difference in this case is that I want to provide a custom field's name instead of a fixed user ID.

Suggest an answer

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

Atlassian Community Events