Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

The support for removing custom field options

...

using the removeCustomFieldOptions action

...

, is available since CLI v9.3.0. In this example, a select list field is used named

...

input

...

 that has options 1, 2, and 3.

The screenshot below shows the "input" custom field configuration

...

:

...

Image Added

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

    Code Block
    themeMidnight
    --action removeCustomFieldOptions --field "input" --options "2"

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

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

    Code Block
    themeMidnight
    --action removeCustomFieldOptions --field "input" --options "2,3"


info
Note

The action works only on the custom fields that allows configuration of options.

allow configuration of options like Select List (single choice), Select List (multiple choices), Radio Buttons, etc.. 


Info
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.