Forums

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

How to get custom field approver smart value

Mohammad Mohibbullah December 11, 2023

Hi,

I'm creating an automation rule, where I need to access the approvers, like whenever someone add approvers, I will send a slack message. 

But I'm not able to get the approvers email address or name. 

I've tried these two
{{Approvers.displayName}}
{{issue.customfield_10003.displayName}




Screenshot 2023-12-11 at 9.33.00 PM.pngScreenshot 2023-12-11 at 9.33.10 PM.png


1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
December 11, 2023

Hello @Mohammad Mohibbullah 

Welcome to the Atlassian community.

Please show us the Automation Rule you have created, include the details of each step.

Is Approvers a single user selection field or multiple user selection field?

Mohammad Mohibbullah December 11, 2023

@Trudy Claspill  Thank you for quick replay, Approvers is a single user selection field, created by Jira.


Screenshot 2023-12-12 at 12.30.19 PM.png


Here is the automation 

Screenshot 2023-12-12 at 12.25.35 PM.pngScreenshot 2023-12-12 at 12.26.06 PM.png

Trudy Claspill
Community Champion
December 11, 2023

In my system the Approvers field created by Jira is a multiple user selection field.

Screenshot 2023-12-11 at 11.18.35 PM.png

Are you using this in a Service Management project with an Approval step added to the Workflow?

Also from the image it appears that you are working with a Team Managed project. Is that correct?

Because Approvers is a multiple selection field the {{approvers}} smart value is a list of users with 0..n users in the list.

If your process is to only ever have one user specified in the Approvers field then you could reference the first user listed with these smart values:

{{approvers.first.displayName}}

{{approvers.first.emailAddress}}

Mohammad Mohibbullah December 12, 2023

Hi,

It's a Team Managed Project, It's not any Approval step in the workflow just a extra field in the ticket.

I've tried these values, but i not getting any information.

{{approvers.first.displayName}}
{{approvers.first.emailAddress}}

Please note that these values are working perfectly
{{assignee.displayName}}
{{issue.url}}

Trudy Claspill
Community Champion
December 12, 2023

I apologize. The values should be

{{issue.approvers.first.displayName}}

{{issue.approvers.first.emailAddress}}

If it is still not working after making that change, Please provide a screen image of your updated rule and show the details of the step where you are trying to use the smart values.

Mohammad Mohibbullah December 22, 2023

Hi @Trudy Claspill , Thank you for your co-operation. Sadly I'm still not able to get the approvers information.

This is my rules
Screenshot 2023-12-22 at 1.59.37 PM.pngScreenshot 2023-12-22 at 1.59.46 PM.png

 

Please note, I'm able to get {{assignee. displayName}} easily.
Sorry for being late.

Mohammad Mohibbullah December 22, 2023

Hi @Trudy Claspill  I've able to make it work, I've removed the approver field and add again, now it's working as expected. Thank you.

Suggest an answer

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

Atlassian Community Events