jira.js
    Preparing search index...

    Function createIssueFieldOption

    • Creates an option for a select list issue field.

      Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.

      Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes.

      Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

      Parameters

      • client: Client
      • parameters: {
            config?: {
                attributes?: (string & {} | "defaultValue" | "notSelectable")[];
                scope?: {
                    global?: {
                        attributes?: ((...) & (...) | "defaultValue" | "notSelectable")[];
                        [key: string]: unknown;
                    };
                    projects?: number[];
                    projects2?: {
                        attributes?: ((...) | (...) | (...))[];
                        id?: number;
                        [key: string]: unknown;
                    }[];
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            fieldKey: string;
            properties?: Record<string, any>;
            value: string;
        }
        • Optionalconfig?: {
              attributes?: (string & {} | "defaultValue" | "notSelectable")[];
              scope?: {
                  global?: {
                      attributes?: ((...) & (...) | "defaultValue" | "notSelectable")[];
                      [key: string]: unknown;
                  };
                  projects?: number[];
                  projects2?: {
                      attributes?: ((...) | (...) | (...))[];
                      id?: number;
                      [key: string]: unknown;
                  }[];
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          }
          • Optionalattributes?: (string & {} | "defaultValue" | "notSelectable")[]

            DEPRECATED

          • Optionalscope?: {
                global?: {
                    attributes?: ((...) & (...) | "defaultValue" | "notSelectable")[];
                    [key: string]: unknown;
                };
                projects?: number[];
                projects2?: {
                    attributes?: ((...) | (...) | (...))[];
                    id?: number;
                    [key: string]: unknown;
                }[];
                [key: string]: unknown;
            }
            • Optionalglobal?: {
                  attributes?: ((...) & (...) | "defaultValue" | "notSelectable")[];
                  [key: string]: unknown;
              }
              • Optionalattributes?: ((...) & (...) | "defaultValue" | "notSelectable")[]

                Defines the behavior of the option in the global context.If notSelectable is set, the option cannot be set as the field's value. This is useful for archiving an option that has previously been selected but shouldn't be used anymore.If defaultValue is set, the option is selected by default.

            • Optionalprojects?: number[]

              DEPRECATED

            • Optionalprojects2?: { attributes?: ((...) | (...) | (...))[]; id?: number; [key: string]: unknown }[]

              Defines the projects in which the option is available and the behavior of the option within each project. Specify one object per project. The behavior of the option in a project context overrides the behavior in the global context.

        • fieldKey: string

          The field key is specified in the following format: $(app-key)__$(field-key). For example, example-add-on__example-issue-field. To determine the fieldKey value, do one of the following:

          • Open the app's plugin descriptor, then app-key is the key at the top and field-key is the key in the jiraIssueFields module. app-key can also be found in the app listing in the Atlassian Universal Plugin Manager.
          • Run Get fields and in the field details the value is returned in key. For example, "key": "teams-add-on__team-issue-field"
        • Optionalproperties?: Record<string, any>

          The properties of the option as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/) are defined in the descriptor for the issue field module.

        • value: string

          The option's name, which is displayed in Jira.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              config?: {
                  attributes?: (string & {} | "defaultValue" | "notSelectable")[];
                  scope?: {
                      global?: {
                          attributes?: ((...) | (...) | (...))[];
                          [key: string]: unknown;
                      };
                      projects?: number[];
                      projects2?: {
                          attributes?: (...)[];
                          id?: number;
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  };
                  [key: string]: unknown;
              };
              id: number;
              properties?: Record<string, any>;
              value: string;
              [key: string]: unknown;
          },
      >