How to add child value to a cascading custom field in Jira using Jira CLI app

How to add child value to a cascading custom field in Jira using Jira CLI app

Overview

This guide provides step-by-step instructions on how to add a child value to a cascading custom field in Jira using the Jira Command Line Interface (CLI). The example involves adding a child value, Workflow, under the parent value Jira, within a custom cascade field type called Atlassian Product.

Step-by-Step Instructions

If a custom field exists:

  • Add Child Value Using CLI

    • Use the following command to add a child value Workflow under the parent value Jira:

      --action addCustomFieldOptions --field "Atlassian Product" --options "Jira - Workflow"
    • This command specifies the custom field and the hierarchical relationship between the parent and child values.

If the Custom field Does not exist:

  1. Create a Custom Field

    • Before adding child values, ensure the custom field Atlassian Product is created in your Jira Cloud instance. This field should be a cascading select list type.

    • To create a custom field, you can use the following command.

    • Please refer to the following documentation to know the type of file you are looking to create Custom Field Types

      --action addCustomField --field "Atlassian Product" --type com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect
  1. Define the Parent Value

    • Ensure the parent value Jira exists within the Atlassian Product custom field.

    • If it does not exist, you can add it using the CLI:

      --action addCustomFieldOptions --field "Atlassian Product" --options "Jira"
  2. Add Child Value Using CLI

    • Please follow the command as mentioned under Add Child Value Using CLI .

Example Command

Here is the exact CLI command for adding the child value Workflow under the parent value Jira:

--action addCustomFieldOptions --field "Atlassian Product" --options "Jira - Workflow"
Screenshot 2024-04-29 at 17.07.45.png