KB : Script to retrieve the list of all estimation fields used by Planning Poker
Purpose
This page describes the way how to extract the list of all fields used by Planning Poker in Server/DC Jira instance hosted with PostgreSQL database.
Use Case
The script has been prepared as per the customer request who wants to clean up server instances from unused custom fields. In order to proceed with clean up, the customer wants to prepare a report of all games with estimation fields in order to avoid reconfiguration of planning poker games and not modify the fields that are used in the game itself. More details have been provided in https://appfire.atlassian.net/browse/SUPPORT-23046.
Runbook:
Connect to the database using psql command line tool and connect to the Jira schema:
The following runbook presents a connection to the docker container. In order to connect to db hosted as PostgreSQL server on the VM, please refer to https://appfire.atlassian.net/wiki/spaces/SUPPORT/pages/607879203
Execute the following script:
select
"NAME" as game_name,
"STORY_POINTS_FIELD_FULL"::json ->> 'id' as custom_field_ID,
"STORY_POINTS_FIELD_FULL"::json ->> 'name' as custom_field_name
from "AO_8496F9_POKER_GAME";
The output should present the list of all games with the field ID and Name, as the following: