Skip to end of banner
Go to start of banner

How to remove options from a custom field using Jira CLI

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

This article explains how to remove one or more options of a custom field that has field type option in Jira using Jira Command Line Interface (CLI).

Instructions

Since CLI v9.3.0, the custom field options can be removed using the removeCustomFieldOptions action. In this example, a select list field is used named "input" which has options 1, 2, and 3.
The screenshot below shows the "input" custom field configuration:

  1. Run the action below to delete the custom field option "2" from the list of options:

    --action removeCustomFieldOptions --field "input" --options "2"

    --field represents the custom field name 
    --options for the custom field option\values

  2. Log in to Jira and verify the custom field configuration. The option is removed as shown in the below screenshot:
  3. To remove more than one custom field options, use a comma-separated list of options as shown below:

    --action removeCustomFieldOptions --field "input" --options "2,3"

The action works only on the custom fields that allow configuration of options like Select List (single choice), Select List (multiple choices), Radio Buttons, etc.. 


It is recommended to test this scenario in a non-production environment or run the action with the --simulate parameter, to verify the behavior before deploying on production environment.
  • No labels