can i get the database query to fetch the customfield name and its default value in jira

Sriveni Kokkonda October 30, 2014

can i get the database query to fetch the customfield name and its default value in jira

1 answer

2 votes
Norman Abramovitz
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.
October 30, 2014

I assume you are looking for an SQL query.   The table customfield has the name and id for the custom fields. 

The table genericconfiguration has the default values

SELECT *

FROM customfield AS CF

JOIN genericconfiguration AS GC ON (CF.ID = GC.ID)

where   GC.DATATYPE = 'DefaultValue'

 

 

aarti rajput July 9, 2020

@Norman Abramovitz  : This Query will not give the actual default value which is set while configuring the custom field .

For e.g. Test1 is custom field and i have set default value for it is "abc".So how can i retrieve this custom field with defualt value as "abc" from Jira DB.

Norman Abramovitz
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.
July 13, 2020

It has been close to six years since I wrote this response.  Jira has different database schemas based upon the version you are using.   I believe you can figure things out once you look at the appropriate schema.

 

https://developer.atlassian.com/server/jira/platform/database-schema/

Suggest an answer

Log in or Sign up to answer