Pulling a custom variable into an email

We have two JIRA plugins that we are using:


  • Codebarrel automation
  • ProjectBalm Risk Register


I have an automation rule set up to email our teams when a risk get assigned to their team. One of the fields I would like to put in the notification email is the exposure (Low, Medium, High, Critical). 

Below is an example of how the body of our email is structured:


Risk {{issue.key}} has been assigned to your team

Risk Rating: <need help here>

To view this risk:

Current Assignee: {{issue.assignee}}

Risk Description:



I am having a tough time figuring out the variable needed to display the risk rating. I have so far attempted the below:


1: {{issue.keys}}

2: {{issue.keys.customfield_11343-val}}

3: {{issue.keys.customfield_11343}}

4: {{customfield_11343-val}}

5: {{issue.fields.exposure-cf-type}}

5: {{issue.fields.customfield_11343-val.exposure-cf-type}}

7: {{issue.fields.customfield_11343-val}}

6: {{customfield_11343-val.exposure-cf-type}}

8: {{issue.fields.customfield_11343}}

9: {{issue.fields.customfield_11343.name}}

10: {{issue.fields.customfield_11343.value}}

11: {{issue.fields.customfield_11343.val}}

12: {{issue.fields.customfield_11343_name}}



The only one that has returned anything is #8 - which has returned the below:


Exposure{id=1, name='Low', description='null', severity=0, bgColor=java.awt.Color[r=20,g=137,b=44], fgColor=java.awt.Color[r=255,g=255,b=255]}



What I would like to extract out of that variable, is the word "Low", or if it were different, then that word. 


Any help is appreciated! 


For reference, below is the information about our environment:

JIRA Version: 7.4.2

Risk Register Version: 3.10.2


2 answers

0 votes
Scott Harwood Community Champion Dec 20, 2017


What you are after is below


 For ready ability sake, you also don't need use the custom field id. You can simple use the name of the field (e.g exposure).


For future reference a good way to debug the output is to use a log action, will save you from sending a bunch of emails to test everything. More about that here.



I had tried the top one already but it didnt display anything for me. The second one you suggested I just attempted but it also didnt appear to give me anything back. 


How can I use a log action in this situation?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


263 views 0 6
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