This resource represents issue priorities. Use it to get, create and update issue priorities and details for individual issue priorities.

Hierarchy

  • CommonHttpService
    • IssuePrioritiesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns IssuePrioritiesService

Methods

  • Returns the list of all issue priorities.

    Permissions required: Permission to access Jira.

    Returns Promise<Priority[]>

    Returned if the request is successful.

    example:

    [
    {
    "description": "Major loss of function.",
    "iconUrl": "https://your-domain.atlassian.net/images/icons/priorities/major.png",
    "id": "1",
    "name": "Major",
    "self": "https://your-domain.atlassian.net/rest/api/3/priority/3",
    "statusColor": "#009900"
    },
    {
    "description": "Very little impact.",
    "iconUrl": "https://your-domain.atlassian.net/images/icons/priorities/trivial.png",
    "id": "2",
    "name": "Trivial",
    "self": "https://your-domain.atlassian.net/rest/api/3/priority/5",
    "statusColor": "#cfcfcf"
    }
    ]

    GET /rest/api/3/priority @scopes-current read:jira-work @scopes-beta read:priority:jira

  • Returns an issue priority.

    Permissions required: Permission to access Jira.

    Parameters

    • params: {
          id: string;
      }
      • id: string

        The ID of the issue priority.

    Returns Promise<Priority>

    Returned if the request is successful.

    example:

    {
    "description": "Major loss of function.",
    "iconUrl": "https://your-domain.atlassian.net/images/icons/priorities/major.png",
    "id": "1",
    "name": "Major",
    "self": "https://your-domain.atlassian.net/rest/api/3/priority/3",
    "statusColor": "#009900"
    }

    GET /rest/api/3/priority/{id} @scopes-current read:jira-work @scopes-beta read:priority:jira

  • Returns a paginated list of priorities. The list can contain all priorities or a subset determined by any combination of these criteria:

    • a list of priority IDs. Any invalid priority IDs are ignored.
    • a list of project IDs. Only priorities that are available in these projects will be returned. Any invalid project IDs are ignored.
    • whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, as there is no concept of default priorities in team-managed projects.

    Permissions required: Permission to access Jira.

    Parameters

    • params: {
          expand?: string;
          id?: string[];
          maxResults?: string;
          onlyDefault?: boolean;
          priorityName?: string;
          projectId?: string[];
          startAt?: string;
      } = {}
      • Optionalexpand?: string

        Use schemes to return the associated priority schemes for each priority. Limited to returning first 15 priority schemes per priority.

      • Optionalid?: string[]

        The list of priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, id=2&id=3.

      • OptionalmaxResults?: string

        The maximum number of items to return per page.

      • OptionalonlyDefault?: boolean

        Whether only the default priority is returned.

      • OptionalpriorityName?: string

        The name of priority to search for.

      • OptionalprojectId?: string[]

        The list of projects IDs. To include multiple IDs, provide an ampersand-separated list. For example, projectId=10010&projectId=10111.

      • OptionalstartAt?: string

        The index of the first item to return in a page of results (page offset).

    Returns Promise<PageBeanPriority>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 2,
    "values": [
    {
    "description": "Major loss of function.",
    "iconUrl": "https://your-domain.atlassian.net/images/icons/priorities/major.png",
    "id": "1",
    "isDefault": true,
    "name": "Major",
    "self": "https://your-domain.atlassian.net/rest/api/3/priority/3",
    "statusColor": "#009900"
    },
    {
    "description": "Very little impact.",
    "iconUrl": "https://your-domain.atlassian.net/images/icons/priorities/trivial.png",
    "id": "2",
    "isDefault": false,
    "name": "Trivial",
    "self": "https://your-domain.atlassian.net/rest/api/3/priority/5",
    "statusColor": "#cfcfcf"
    }
    ]
    }
  • Method to initialize the class. Normally used to set up validation rules.

    Returns void