Forums

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

How to find out custom fields mapped to a project?

Vineela Durbha
Contributor
August 18, 2020

Hi Team,

 

Is there any way we can find out what custom fields are part of each project through jira UI or SQL query?

3 answers

1 vote
Ravi Sagar _Sparxsys_
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.
August 18, 2020

Hi @Vineela Durbha 

Not very straight forward but possible.

  • Take a look at the Jira database scheme.
  • Fetch issue type screen scheme association with projects
  • Fetch Screen scheme association with issue type screen scheme
  • Fetch Screen association with fields (and 
  • Find fields used in workflows (and few more joins to get the projects)
  • In the some of the queries you can filter further based on applicable contexts as well. 

..and I am sure I missed something but if you look at the schema then in few hours you can write these queries. I prefer dumping the output in Excel and not create too many joins, which makes it difficult to get the results especially from a big instance.

You can either run these queries directly on database (please not on production) or use ScriptRunner to execute SQL using Groovy from the console.

Or you can write Groovy scripts to fetch the same information using Jira Java API.

Sorry I don't have SQL queries to share at the moment but I hope it was helpful.

Ravi

1 vote
Kinnera
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.
August 18, 2020

Hi @Vineela Durbha 

If you're a Jira Admin you will be able to see the custom fields here  Cog-wheel icon -> Issues -> Custom fields

Please click on that and filter the Projects to find out which custom fields are used in the projects or you can also see the projects in the Available Contexts column where the custom fields are associated to those specified projects.

I hope this will help you!

 

Thanks

Kinnera

Arjun Hazari January 3, 2024

 How about the fields on tickets which are hidden due to issue security schemes?  

0 votes
Mehmet A _Bloompeak_
Atlassian Partner
August 18, 2020 edited

Hi @Vineela Durbha ,

You can use the rest api for fields. It returns all the fields. By default custom fields are common for all classic projects. But in next-gen projects custom fields are project specific and the rest api response includes project id association for next-gen custom fields.

https://{jiraserver}/rest/api/3/field

Vineela Durbha
Contributor
August 18, 2020

@Mehmet A _Bloompeak_ 

Thanks for your reply. I was looking for a way to be done through SQL query or something.

I will look into the rest api even. Thanks for your help

Suggest an answer

Log in or Sign up to answer