Use value of dropdownlist in email

Dave Bosman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2017

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
Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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

0 votes
andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2017

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

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events