Use value of dropdownlist in email

Hi,

 

When i try to use the value of a dropdown list in an email with the automation plugin it does not give me the correct value.

If i use {{issue.fields.company.value}} there is no value in the mail

If i use {{issue.fields.company}} i get following result in the email

{self=https://www.xxxxxxx.xxx/rest/api/2/customFieldOption/13045, value=xxxxxxxxx, id=13045, child=null, children=null}

Anyone have an idea how to get the correct result?

 

Regards

Dave

2 answers

0 vote

Hi Dave,

That's a bit strange.  I'm assuming 'company' is a select field?

{{issue.fields.company.value}} should definitely work (especially given that {{issue.fields.company}} prints out the value).

Can you raise a support request please via https://codebarrel.io/support ?  

In the (private) support request can you include information about your fields and an example issue that you're trying to send an e-mail for:

  • https://<yourinstanceurl>/rest/api/2/field
  • https://<yourinstanceurl>/rest/api/2/issue/<ISSUEKEY>

Just save the JSON output of those to files and attach them to the support case.

Additionally, can you include screenshots of your automation rule please and your audit log (showing the rule execution for the issue above)?

Cheers,

  Andreas

 

0 vote
Nick Menere Community Champion May 22, 2017

Hey David,

It looks as the company field is a multi-select.

There for you can't directly reference the "value" as there may be multiple company's selected.
You can reference the first company like:

{{issue.fields.company.first.value}}

Or you can loop over them using:

{{#issue.fields.company}}{{value}}{{/issue.fields.company}}

Let us know if this fixes your issue.

Cheers,
Nick

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 Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

358 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