Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to display custom field in email automation?

Gregory James December 28, 2022

Hey Guys....I have custom fields, such as "Customer" (which is a drop down menu), "Non Conformity Type" which is multiple checkboxes in a list, and "Complaint Type" which is 2 options, 'internal or external' -- I'm trying to get them to display in the automated email that I have being sent when an issue is created. I also want to do it when an issue is Completed. Here is what I'm using below, but it doesn't return anything. It's blank....

 

Complaint Type: {{issue.COMPLAINT TYPE.name}}

Customer: {{issue.Customer.name}}

Non Conformity Type: {{issue.non conformity type.name}}

 

I know this isn't correct, can someone help me?

 

1 answer

1 accepted

0 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2022

Hi @Gregory James ,  Please try the following leaving off the ".name"

Complaint Type: {{issue.COMPLAINT TYPE}}

Customer: {{issue.Customer}}

Non Conformity Type: {{issue.non conformity type}}

Gregory James December 28, 2022

Jack, thank you so much it worked, however CUSTOMER didn't work. But the others did. Perhaps its because I have 2 custom fields named Customer? so it doesn't know which one to pick?

Gregory James December 28, 2022

or maybe because its in a  drop down menu? I actually checked I only have one custom field called CUSTOMER, which is a dropdown menu of about 110 items, I just want it to display which one is selected. should be "{{issue.CUSTOMER}}" right? or is it different with a list

Bill Sheboy
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.
December 28, 2022

Hi @Gregory James 

Is your Customer field a user field or a basic selection field?

  • If a user field, please try {{issue.Customer.displayName}}
  • And if a selection field, please try {{issue.Customer.value}}

Kind regards,
Bill

Gregory James December 28, 2022

Nah Bill, didn't work, returns Blank values either command

Bill Sheboy
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.
December 28, 2022

Okay, let's try this...

Smart values are name, spacing, and case-sensitive...Perhaps the smart value you are using for the "Customer" field is not correct, and that would result in it always being null (empty).

You can check that by finding an example issue with a Customer set, and then use the following how-to.  Basically you call the REST API with a browser, and that will show all possible smart values for your fields.

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Gregory James December 29, 2022

Bill, I just used the customfield_00000 and it worked like a charm

Like # people like this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 29, 2022

I am a bit perplexed as to why Bill's suggestion did not work unless there are two custom fields by the same name.

Bill Sheboy
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.
December 29, 2022

Hi, Jack!  Without seeing the result of the REST API call, I hypothesize possible causes could be:

  1. there are indeed two, or more, fields with the same name at that scope, as you note
  2. there is a trailing/leading space in the name of the field
  3. the smart value is lowercase
  4. and the less likely one...the field is somehow tied to an addon and has some dynamic behavior impact resolution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events