Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,126
Community Members
 
Community Events
165
Community Groups

Using {{approval.approver.displayName}} does not work in Automation

Edited

I'm working on an Automation rule that will send an email to the approvers when the ticket approval process has been completed. All smart values are properly calculated, except for {{approval.approver.displayName}} which should give me the display name of the person who approved the change.

Based on the documentation, {{approval.approver}} should give you the user id of the person who approved the change and it is mentioned that user smart values can be combined with this so I assumed that adding ".displayName" would do the trick but when the email is sent that value shows empty.

Here is the structure of the email I'm sending:

{{approval.approver.displayName}} has completed the approval on {{approval.completedDate}} with {{approval.decision}} decision for {{issue.key}}.

*** Approvals status: ***
{{#issue.Approvals}}
{{#approvers}}
Name: {{approver.displayName}} - Action: {{approverDecision}}
{{/}}
{{/}}

 

Any thoughts?

2 answers

1 accepted

0 votes
Answer accepted
James Navin Atlassian Team Jun 26, 2022

Hi @Rodolfo Romero ,

Thanks for raising this issue. It looks like you've stumbled across a bug. The `{{approval.approver}}` is actually currently being rendered as a plain `String`, rather than as a `User` object and hence won't work for your use case.

I have raised https://codebarrel.atlassian.net/browse/AUT-2414 to address the problem. Will hopefully be able to fix it soon.

Cheers,

James

Hi James,

I can confirm that this has been fixed and deployed to Cloud.

Thanks!

Rodolfo

0 votes
Jack Brickey Community Leader Jun 17, 2022

what if you test w/o DisplayName then check if it is giving the correct accountID? Just trying to dissect the problem to find the broken bit. You might use the log action to record {{approval.approver.displayName}}  as well. 

Without "displayName" it provides the account ID.

Jack Brickey Community Leader Jun 20, 2022

ok that is good to know. if you use log action with 

{{approval.approver.displayName}}

what is logged? 

I have the exact same problem, I'm trying to use Automation to work out who is the approver in a request with multiple approvers, then send an email which includes the name of the person who approved the request.

The following shows all possible approvers which is what I do not require.

{{issue.Approvers.displayName}}

 

The following is blank, logging it only returns 'Log'

{{approval.approver.displayName}}

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,931 views 37 49
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you