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 votes

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 votes
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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,390 views 0 8
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