How do I send an email to an Approver using Automation for JIRA?

I'm testing out various rules using Automation for JIRA (we have JIRA Server 7.3.3) and it's working out great so far, but I am stuck on a particular email rule.

We have a custom Approver field for use in certain projects, and my users have asked if JIRA can send an email notifying someone if they need to review and approve a new issue.  It seemed easy enough, but I can't get the email address working properly.

The Approver field is of type "User Picker (multiple users)". In the Automation rule I've tried using these entries, but none of them return any values. I have confirmed the custom field ID is 10180.

  • {{issue.approver}}
  • {{issue.customField_10180}}
  • {{issue.approver.displayName}}
  • {{issue.customField_10180.displayName}}
  • {{issue.approver.emailAddress}}
  • {{issue.customField_10180.emailAddress}}

I expected this field to work the same way as reporter or assignee, but apparently this is not the case.

Any ideas on how to get the Approver's email address?

2 answers

1 accepted

1 vote
Andreas Knecht Community Champion Sep 27, 2017

Hi Michael,

So you should be able to use this syntax for a multi-user picker:

{{#issue.Approver}}{{emailAddress}}, {{/}}

This should  produce a comma separated list of all approvers.  Note that the field name has to be exactly the same as it is called on the view issue page (including upper/lower case characters).  

Since it's a multi-picker, you need to use a list expansion (the #). 

For more details see the "How do I work with lists?" section in our docs: https://codebarrel.atlassian.net/wiki/spaces/AUTO4J/pages/27656216/Smart+Fields


Cheers,

  Andreas

Hi Andreas,

It works! Thanks so much for your help. I will review the section you specified in your comment.

Best wishes,

Mike Thompson

0 vote
Boris Berenberg Community Champion Sep 27, 2017

Have you tried {{issue.customField_10180.value}}

Hi Boris,

Just tried and it didn't work.  Thanks for the option!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

125 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you