Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Appending users to approver field

Benjamin Leidner February 4, 2024

Hello Community-

I have a request type for access to a folder.  The requester's manager is always added to custom field "Approvers" (array) and then I look up the requested folder(s) in Assets.  If the folders are listed, add all of the approvers named for each folder.

The first part works fine, the manager is added as an approver.  But I can't get the additional approvers populated (appended).

My automation queries the "Restricted Systems" schema:

objecttype = "MASTER Restricted Objects" and "System" IN ("{{issue.customfield_10162.join("\",\"")}}")

...And then returns the approvers for those objects

{
"update": {
"customfield_10003": [{
"add": "{{lookupObjects.Approver}}"}]
}}

I also add these approvers to a comment and that is successful, but I can't get them in the Approvers field.

Automation for Jira added a Comment

13 minutes ago

COMMENTS
Internal note

Asset Approver(s) = 628d4708891ea9006a9e1793, 628d472c8026a10068b147d8, 628d4708d5ec4f0069e82a36, 628d46e6b1594d0069080445, 628d46c7b1594d006908042f

What am I doing wrong?

Thanks,

-Ben

Approvers Issue.jpg

1 answer

0 votes
Marc - Devoteam
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.
February 5, 2024

Hi @Benjamin Leidner 

Is the value in Assets text, then you could try: "{{lookupObjects.Approver.(attribute name)"}}

Or this KB article might help you out.

https://confluence.atlassian.com/jirakb/how-to-auto-populate-approvers-from-asset-objects-attributes-using-automation-in-assets-1072474097.html 

Benjamin Leidner February 5, 2024

Hi Marc and thanks for your reply.  "Approver " is not text, it is a user attribute.  My CSV contains the Atlassian ID of the approver so when I import it into Assets it translates to the correct user.

I saw that article but it did not work for me.  Also, I believe that syntax is to replace data in the field, not update.

 

Thanks!

Asset Attribute.jpgAsset Object.jpg

Suggest an answer

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

Atlassian Community Events