I am successfully capture the data from two tables as required but still am not able to get the default value of custom field which is initially set at the time of field creation.
Query:
select cf.ID "Custom field ID", cf.cfname "Custom field Name", cf.defaultvalue "Default Value",
TRIM('com.atlassian.jira.plugin.system.customfieldtypes:' from cf.CUSTOMFIELDTYPEKEY) "Type", cfd.customvalue "List of values"
from customfield cf JOIN customfieldoption cfd ON cf.ID = cfd.CUSTOMFIELD
where cf.CUSTOMFIELDTYPEKEY LIKE "%multiselect%" OR
cf.CUSTOMFIELDTYPEKEY LIKE "%select%" OR
cf.CUSTOMFIELDTYPEKEY LIKE "%radiobuttons%" OR
cf.CUSTOMFIELDTYPEKEY LIKE "%checkboxes%";
Its giving me the below output: Where Default value for all custom field is NULL. it should give the exact default value which is set at the time of field creation.
Custom field ID | Custom field Name | Default Value | Type | List of Values |
10112 | Initiative | NULL | select | Yes |
10117 | T-Shirt Size | NULL | radiobutton | XL |
10117 | Size | NULL | multiselect | L |