Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Field ID lookup

Jacques B
Contributor
June 17, 2022

Good day,

A previous administrator wrote the script below as part of a Transition.

if(issue.fields.customfield_10296.value=="Yes" && issue.fields.customfield_10310.value!="Yes")
return;

How can I lookup which Custom Field customfield_10296 refers to?

Thanks in advance!

2 answers

2 accepted

5 votes
Answer accepted
Dirk Ronsmans
Community Champion
June 17, 2022

Hi @Jacques B ,

In addition to the answer of @Vikrant Yadav , you can also just

  • go to your custom fields in your instance.
  • Open any random field configuration and then just change the ID in the url bar.

After that the correct field configuration will load and you can see what it relates to :)

e.g: https://yourhostname/secure/admin/ConfigureCustomField!default.jspa?customFieldId=13416

If you do it that way just remove the "customfield_" part

Jacques B
Contributor
June 17, 2022

Thank you, this is very simple!

Like # people like this
3 votes
Answer accepted
Vikrant Yadav
Community Champion
June 17, 2022

Hi @Jacques B You can run following API url in browser,  to get Field Name by searching field by Field ID :- 

For Server/DC :- https://jira.yordomain.com/rest/api/2/field

For JIRA Cloud :- https://powerusers.atlassian.net/rest/api/3/field

you will get complete information of a field, convert json data in csv to get complete list of custom field along with field id and field type  :- 

 

{"id":"customfield_10032","key":"customfield_10032","name":"Field 4","untranslatedName":"Field 4","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10032]","Field 4","Field 4[Number]"],"schema":{"type":"number","custom":"com.atlassian.jira.plugin.system.customfieldtypes:float","customId":10032}},

Monica Romero
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!
October 1, 2024

Hi @Vikrant Yadav 

I am trying to use this API call in some code so I can pull the most up to date info on these custom fields. 

https://jira.yordomain.com/rest/api/2/field

I am getting a 400 response on a simple get request which tells me I am not passing the correct headers. Do you happen to know what headers I would need to pass to access this data through a python script?

This is my request: 

 

import requests

url = "https://jira-gpd.gm.com:8443/rest/api/2/field"
headers = {"Content-Type": "application/json",
"Accept Encoding": "deflate"}

response = requests.get(url, headers = headers)

print(response)

The following is what is printed 
<Response [400]>

Monica Romero
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!
October 1, 2024

Update: I am now getting a 200 response after creating a PAT and passing that with the Authorization header.

Like Vikrant Yadav likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events