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

Custom Field id not working in Smart Values

Hunter1428
Contributor
July 13, 2020

Hey all,

I am updating our email templates with field id's instead of the field name. But for some reason when I use the id, I get no results?

Looking around the forums and documentation I find some conflicting info and neither work.

 

The documentation here - https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

Says use: which neither actually work for me.

  • {{issue.CustomField.id}}
  • {{issue.CustomField.name}}

This is slightly confusing as I have been using, which I have never had a problem with.

  • {{issue.fields.CustomField}}

 

And after looking at this thread - https://community.atlassian.com/t5/Jira-Questions/Can-t-access-Custom-Field-value-in-Jira-Automation/qaq-p/730676

  • {{issue.fields."paste your field name here".value}}

I tried this and still nothing...

 

Any ideas?

 

 

3 answers

1 accepted

5 votes
Answer accepted
sreuter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2020

@Hunter1428 To get the value of your field by id you can use this smart value: {{issue.fields.customfield_10040}} ..

Let me know how it goes! :)

Hunter1428
Contributor
July 29, 2020

This worked great, I feel silly for not just adding the id number at then end of {{issue.fields.CustomField}} haha

Thanks!

Like # people like this
andy_deighton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2022

Does this work with fields that have been added to a team-managed project's issue types? Team-managed works slightly differently in that you can add field templates to an issue using the Issue Types page. When I try using smart values like {{issue.fields.customfield_11308.value}} in my automation rules, it always returns nothing, for issues in my team-managed instance.

 

Heeelp!!

Like # people like this
Gursimran Singh June 10, 2022

I am using something similar, 
I have a user picker field, and I am using 

{{issue.Approvers}}  - This gives me user id in return.
{{issue.Approvers.displayName}} - this returns me the Name of the person.

What should I use to get the email instead ?  Any ideas

Dave F
Contributor
June 30, 2022

Try {{issue.Approvers.emailAddress}}

Like Marc Isikoff likes this
0 votes
Médéric Lefebvre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 10, 2020

Hi everyone, where do you find the IDs of your custom fields ? Is it necessary to be an administrator ?

Thanks.

Hunter1428
Contributor
November 10, 2020

Hey!

If you search the filter name in the JQL box, it will say the name and the ID :)

Andreas Safar
Contributor
July 27, 2021

Go to Settings -> Issues -> Custom Fields -> Search for your field -> Click on ... (3 dots) -> then click on Edit Details

On this custom fields screen you will find the id within the URL (something like atlassian.net/...EditCustomField!default.jspa?id=10065)

Like # people like this
Marc Isikoff
Contributor
November 7, 2023

Or run a JQL query and choose your custom fields as a column; run the query then sort by your custom field and it will show the custom field #.

Leonel Goitia September 25, 2024

You can list all your custom fields with this https://youworkspace.atlassian.net/rest/api/3/field 

0 votes
Mackowiak
Contributor
July 28, 2020

Hi, 

The following works fine to set security based on a custom field value

{
"update": {"security": [{"set": {"name": "{{issue.customfield_10054}}"}}]}
}

Guillaume.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events