Retrieve all custom field configuration and custom field values in Jira from the database
プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。
要約
A user needs to retrieve all custom field configurations and field values that exist in their instance.
環境
All currently supported Jira Server and Data Center versions
診断
This is not a native feature available in Jira and will need to be performed by querying the database directly.
ソリューション
Please note the following information is provided as-is since using SQL for business intelligence is beyond the scope of Atlassian Support.
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
Retrieve the definitions of all custom fields configured in the Jira instance.
select cf.id, cf.cfname, cf.description, cfo.customvalue, cfo.disabled from customfield as cf join customfieldoption as cfo on cf.id = cfo.customfield
Retrieve all custom field value data for all issues in the Jira instance.
select CONCAT(p.pkey,'-',ji.issuenum) as issue_key, cf.cfname, cf.id as custom_field_id, cf.description, cfv.stringvalue, cfv.numbervalue, cfv.textvalue, cfv.datevalue, cfv.valuetype from customfield as cf join customfieldvalue as cfv on cf.id = cfv.customfield join jiraissue as ji on cfv.issue = ji.id join project p on p.id = ji.project