jira.js
    Preparing search index...

    Function getIssue

    • Returns a full representation of the issue for the given issue key. An issue JSON consists of the issue key, a collection of fields, a link to the workflow transition sub-resource, and (optionally) the HTML rendered values of any fields that support it (e.g. if wiki syntax is enabled for the description or comments). The fields param (which can be specified multiple times) gives a comma-separated list of fields to include in the response. This can be used to retrieve a subset of fields. A particular field can be excluded by prefixing it with a minus. By default, all (*all) fields are returned in this get-issue resource. Note: the default is different when doing a jql search -- the default there is just navigable fields (*navigable).

      • *all - include all fields
      • *navigable - include just navigable fields
      • Summary,comment - include just the summary and comments
      • -comment - include everything except comments (the default is *all for get-issue)
      • *all,-comment - include everything except comments

      The properties param is similar to fields and specifies a comma-separated list of issue properties to include. Unlike fields, properties are not included by default. To include them all send ?properties=*all. You can also include only specified properties or exclude some properties with a minus (-) sign.

      • *all - include all properties
      • *all, -prop1 - include all properties except prop1
      • prop1, prop1 - include prop1 and prop2 properties

      Jira will attempt to identify the issue by the issueIdOrKey path parameter. This can be an issue id, or an issue key. If the issue cannot be found via an exact match, Jira will also look for the issue in a case-insensitive way, by looking to see if the issue was moved. In either of these cases, the request will proceed as normal (a 302 or other redirect will not be returned). The issue key contained in the response will indicate the current value of issue's key.

      The expand param is used to include, hidden by default, parts of response. This can be used to include:

      • RenderedFields - field values in HTML format
      • Names - display name of each field
      • Schema - schema for each field which describes a type of the field
      • Transitions - all possible transitions for the given issue
      • Operations - all possibles operations which may be applied on issue
      • Editmeta - information about how each field may be edited. It contains field's schema as well.
      • Changelog - history of all changes of the given issue
      • VersionedRepresentations - REST representations of all fields. Some field may contain more recent versions. RESET representations are numbered. The greatest number always represents the most recent version. It is recommended that the most recent version is used. version for these fields which provide a more recent REST representation. After including versionedRepresentations "fields" field become hidden.

      Parameters

      • client: Client
      • parameters: {
            expand?: string;
            fields?: string;
            issueIdOrKey: string;
            properties?: string;
            updateHistory?: string;
        }
        • Optionalexpand?: string

          The expand param is used to include, hidden by default, parts of response. This can be used to include: renderedFields, names, schema, transitions, operations, editmeta, changelog, versionedRepresentations.

        • Optionalfields?: string

          The list of fields to return for the issue. By default, all fields are returned.

        • issueIdOrKey: string

          Issue id or key

        • Optionalproperties?: string

          The list of properties to return for the issue. By default no properties are returned.

        • OptionalupdateHistory?: string

          The updateHistory param adds the issues retrieved by this method to the current user's issue history

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              changelog?: {
                  histories?: {
                      author?: {
                          active?: boolean;
                          avatarUrls?: Record<(...), (...)>;
                          displayName?: string;
                          emailAddress?: string;
                          key?: string;
                          name?: string;
                          self?: string;
                          timeZone?: string;
                          [key: string]: unknown;
                      };
                      created?: Date;
                      historyMetadata?: {
                          activityDescription?: string;
                          activityDescriptionKey?: string;
                          actor?: {
                              avatarUrl?: ...;
                              displayName?: ...;
                              displayNameKey?: ...;
                              id?: ...;
                              type?: ...;
                              url?: ...;
                              [key: ...]: ...;
                          };
                          cause?: {
                              avatarUrl?: ...;
                              displayName?: ...;
                              displayNameKey?: ...;
                              id?: ...;
                              type?: ...;
                              url?: ...;
                              [key: ...]: ...;
                          };
                          description?: string;
                          descriptionKey?: string;
                          emailDescription?: string;
                          emailDescriptionKey?: string;
                          extraData?: Record<(...), (...)>;
                          generator?: {
                              avatarUrl?: ...;
                              displayName?: ...;
                              displayNameKey?: ...;
                              id?: ...;
                              type?: ...;
                              url?: ...;
                              [key: ...]: ...;
                          };
                          type?: string;
                          [key: string]: unknown;
                      };
                      id?: string;
                      items?: {
                          field?: (...)
                          | (...);
                          fieldtype?: (...) | (...);
                          from?: (...) | (...);
                          fromString?: (...) | (...);
                          to?: (...) | (...);
                          toString?: (...) | (...);
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  }[];
                  maxResults?: number;
                  startAt?: number;
                  total?: number;
                  [key: string]: unknown;
              };
              editmeta?: {
                  fields?: Record<
                      string,
                      {
                          allowedValues?: Record<string, any>[];
                          autoCompleteUrl?: string;
                          defaultValue?: Record<string, any>;
                          fieldId?: string;
                          hasDefaultValue?: boolean;
                          name?: string;
                          operations?: string[];
                          required?: boolean;
                          schema?: {
                              custom?: string;
                              customId?: number;
                              items?: string;
                              system?: string;
                              type?: string;
                              [key: string]: unknown;
                          };
                          [key: string]: unknown;
                      },
                  >;
                  [key: string]: unknown;
              };
              fields?: Record<string, any>;
              fieldsToInclude?: { included?: string[]; [key: string]: unknown };
              id?: string;
              key?: string;
              names?: Record<string, string>;
              operations?: { linkGroups?: LinkGroup[]; [key: string]: unknown };
              properties?: {
                  properties?: Record<string, string>;
                  [key: string]: unknown;
              };
              renderedFields?: Record<string, any>
              | null;
              schema?: Record<
                  string,
                  {
                      custom?: string;
                      customId?: number;
                      items?: string;
                      system?: string;
                      type?: string;
                      [key: string]: unknown;
                  },
              >;
              self?: string;
              transitionBeans?: {
                  description?: string;
                  fields?: Record<
                      string,
                      {
                          allowedValues?: Record<(...), (...)>[];
                          autoCompleteUrl?: string;
                          defaultValue?: Record<string, any>;
                          fieldId?: string;
                          hasDefaultValue?: boolean;
                          name?: string;
                          operations?: string[];
                          required?: boolean;
                          schema?: {
                              custom?: (...) | (...);
                              customId?: (...) | (...);
                              items?: (...) | (...);
                              system?: (...) | (...);
                              type?: (...) | (...);
                              [key: string]: unknown;
                          };
                          [key: string]: unknown;
                      },
                  >;
                  id?: string;
                  name?: string;
                  opsbarSequence?: number;
                  to?: {
                      description?: string;
                      iconUrl?: string;
                      id?: string;
                      name?: string;
                      self?: string;
                      statusCategory?: {
                          colorName?: string;
                          id?: number;
                          key?: string;
                          name?: string;
                          self?: string;
                          [key: string]: unknown;
                      };
                      statusColor?: string;
                      [key: string]: unknown;
                  };
                  [key: string]: unknown;
              }[];
              transitions?: {
                  description?: string;
                  fields?: Record<
                      string,
                      {
                          allowedValues?: Record<(...), (...)>[];
                          autoCompleteUrl?: string;
                          defaultValue?: Record<string, any>;
                          fieldId?: string;
                          hasDefaultValue?: boolean;
                          name?: string;
                          operations?: string[];
                          required?: boolean;
                          schema?: {
                              custom?: (...) | (...);
                              customId?: (...) | (...);
                              items?: (...) | (...);
                              system?: (...) | (...);
                              type?: (...) | (...);
                              [key: string]: unknown;
                          };
                          [key: string]: unknown;
                      },
                  >;
                  id?: string;
                  name?: string;
                  opsbarSequence?: number;
                  to?: {
                      description?: string;
                      iconUrl?: string;
                      id?: string;
                      name?: string;
                      self?: string;
                      statusCategory?: {
                          colorName?: string;
                          id?: number;
                          key?: string;
                          name?: string;
                          self?: string;
                          [key: string]: unknown;
                      };
                      statusColor?: string;
                      [key: string]: unknown;
                  };
                  [key: string]: unknown;
              }[];
              versionedRepresentations?: Record<string, any>;
              [key: string]: unknown;
          },
      >