jira.js
    Preparing search index...

    Function replaceCustomFieldOption

    • Replaces the options of a custom field.

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

      Permissions required: Administer Jira global permission.

      Parameters

      • client: Client
      • parameters: {
            contextId: number;
            fieldId: string;
            jql?: string;
            optionId: number;
            replaceWith?: number;
        }
        • contextId: number

          The ID of the context.

        • fieldId: string

          The ID of the custom field.

        • Optionaljql?: string

          A JQL query that specifies the issues to be updated. For example, project=10000.

        • optionId: number

          The ID of the option to be deselected.

        • OptionalreplaceWith?: number

          The ID of the option that will replace the currently selected option.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              description?: string;
              elapsedRuntime: number;
              finished?: number;
              id: string;
              lastUpdate: number;
              message?: string;
              progress: number;
              result?: {
                  errors?: {
                      errorMessages?: string[];
                      errors?: Record<string, any>;
                      httpStatusCode?: number;
                      [key: string]: unknown;
                  };
                  modifiedIssues?: number[];
                  unmodifiedIssues?: number[];
                  [key: string]: unknown;
              };
              self: string;
              started?: number;
              status: | string & {}
              | "ENQUEUED"
              | "RUNNING"
              | "COMPLETE"
              | "FAILED"
              | "CANCEL_REQUESTED"
              | "CANCELLED"
              | "DEAD";
              submitted: number;
              submittedBy: number;
              [key: string]: unknown;
          },
      >