How do you get custom field labels from API for JIRA issues?

Pulling the names for JIRA custom fields: from API instead of the ID: Wondering if there is an easy or programmatic way (that is less prone to error & is scalable as new custom fields are added) to pull the names for custom fields in an API call.

We're using the BI tool Qlik Sense for building analytic dashboards to publish in Confluence pages.  Like many people, we have custom fields in JIRA. We're trying to use 2 API calls with the Qlik Sense rest connector to get the:

1. issues from a specific JIRA filter

2. custom fields names for these issues - https://ourprojectname.atlassian.net/rest/api/latest/field/

We're having problems trying to create a simple table with JIRA issues and columns that display the actual name for a custom field, not the ID.

 

Any thoughts on this? I'm guessing this is a common issue. There must be something easier than manually matching names with IDs.
Thanks!!

 

3 answers

0 votes

Hi Jessica,

The following provides a lot more information than you need, however, it will provide the custom field's name and you would just need to search/filter out the name of your custom field:

http://localhost:8080/rest/api/latest/issue/createmeta?projectKeys=BSM&expand=projects.issuetypes.fields

Cheers,

Branden

For me there is no way to do that in one call. This is, I guess, related to the way custom fields data is stored.
But custom fields doesn't change after been created... so ID won't change a lot. How ever they could be different in development system than in productive system (do a copy to sync them).


On a projet I've created a call to get custom fields correspondance and I do mapping. In my application I use custom fields names (view by the user) and in my calls I automaticaly switch them to the technical ugly field names...

 

I don't think this will helps you a lot because you a bound to a devlopment framework within BI tool Qlik Sense...
That's why we build reportings at Database level which is a little by more intrusive but very efficent and allow user to have interactive reports for free on Excel for instance....

Hi Jessica,

you can get the field names by adding an expand parameter to your search call. Assuming you use this endpoint, you can simply add "expand=names" to it. This gives you the list of names in the response as well. You can try e.g:

https://k15t.jira.com/rest/api/2/search?maxResults=1&expand=names

You still have to map the field ids to get the name, but you have it in one call.

Cheers,

Matthias.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,781 views 11 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot