Email results of a Custom Field

I am using Automation for JIRA. I am emailing the results of a filter daily in order to fire off some simple automation. I am trying to extract the values of Customfield 11802. In the SEND EMAIL 'Content' section I've included the string: {{issue.customfield_11802}} This is returning the API URL in the body of the email sent to me. {self=https://jira.instance.com/rest/api/2/customFieldOption/15859, value=A FIELD VALUE, id=15859}

My custom field is a checkbox with 5 options, IDs: 15859, 15860, 15861, 15862, 15863. It is possible for multiple values to be selected. How do I format the SEND EMAIL 'Content' section to return the Custom Field IDs or Names?

1 answer

1 accepted

0 vote
Andreas Knecht Community Champion Oct 05, 2017

Hi Bryan,

Yes, you can iterate over multi-value fields.

So something like this would produce a space separated list of the names:

{{#issue.customfield_11802}}{{value}} {{/}}

See our "How do I work with lists?" section for more examples: https://codebarrel.atlassian.net/wiki/spaces/AUTO4J/pages/27656216/Smart+Fields#SmartFields-HowdoIworkwithlists?lists

 

Cheers,

Andreas

Excellent. Thanks so much! I added a comma and space to make it more readable: 

{{#issue.customfield_11802}}{{value}}, {{/}}
Andreas Knecht Community Champion Oct 05, 2017

Yeah I wasn't 100% sure how you wanted to print it.

I think your syntax will produce a trailing comma. You can get rid of that with:

{{#issue.customfield_11802}}{{value}}{{^last}}, {{/}}{{/}}

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Apr 10, 2018 in Marketplace Apps

Learn about how Stefan K. built one of the *first ever* Marketplace apps

In this post you will discover more about the evolution of K15t software, some big topics they're currently focusing on in the app space, and a rare (not not funny!) photo of founders Mike Cannon-Bro...

13,054 views 11 24
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