This resource represents issue priority schemes. Use it to get priority schemes and related information, and to create, update and delete priority schemes.

Hierarchy

  • CommonHttpService
    • PrioritySchemesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns PrioritySchemesService

Methods

  • Creates a new priority scheme.

    Permissions required: Administer Jira global permission.

    Parameters

    Returns Promise<WithResponse<{
        body: PrioritySchemeId;
        mediaType: "application/json";
        status: 201 | 202;
    }>>

    • status: 201, mediaType: application/json

      Returned if the request is completed.

      example:

      {
      "id": "10001"
      }
    • status: 202, mediaType: application/json

      Returned if the request is accepted.

      example:

      {
      "id": "10001",
      "task": {
      "self": "https://your-domain.atlassian.net/rest/api/3/task/1",
      "id": "1",
      "description": "Task description",
      "status": "COMPLETE",
      "result": "the task result, this may be any JSON",
      "submittedBy": 10000,
      "progress": 100,
      "elapsedRuntime": 156,
      "submitted": 1501708132800,
      "started": 1501708132900,
      "finished": 1501708133000,
      "lastUpdate": 1501708133000
      }
      }
  • Returns a paginated list of priorities available for adding to a priority scheme.

    Permissions required: Permission to access Jira.

    Parameters

    • params: {
          exclude?: string[];
          maxResults?: string;
          query?: string;
          schemeId: string;
          startAt?: string;
      }
      • Optionalexclude?: string[]

        A list of priority IDs to exclude from the results.

      • OptionalmaxResults?: string

        The maximum number of items to return per page.

      • Optionalquery?: string

        The string to query priorities on by name.

      • schemeId: string

        The priority scheme ID.

      • OptionalstartAt?: string

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

    Returns Promise<PageBeanPriorityWithSequence>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 3,
    "values": [
    {
    "description": "Serious problem that could block progress.",
    "iconUrl": "/images/icons/priorities/high.svg",
    "id": "1",
    "isDefault": false,
    "name": "High",
    "statusColor": "#f15C75"
    },
    {
    "description": "Has the potential to affect progress.",
    "iconUrl": "/images/icons/priorities/medium.svg",
    "id": "2",
    "isDefault": true,
    "name": "Medium",
    "statusColor": "#f79232"
    },
    {
    "description": "Minor problem or easily worked around.",
    "iconUrl": "/images/icons/priorities/low.svg",
    "id": "3",
    "isDefault": false,
    "name": "Low",
    "statusColor": "#707070"
    }
    ]
    }
  • Returns a paginated list of priorities by scheme.

    Permissions required: Permission to access Jira.

    Parameters

    • params: {
          maxResults?: string;
          schemeId: string;
          startAt?: string;
      }
      • OptionalmaxResults?: string

        The maximum number of items to return per page.

      • schemeId: string

        The priority scheme ID.

      • OptionalstartAt?: string

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

    Returns Promise<PageBeanPriorityWithSequence>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 3,
    "values": [
    {
    "description": "Serious problem that could block progress.",
    "iconUrl": "/images/icons/priorities/high.svg",
    "id": "1",
    "isDefault": false,
    "name": "High",
    "statusColor": "#f15C75"
    },
    {
    "description": "Has the potential to affect progress.",
    "iconUrl": "/images/icons/priorities/medium.svg",
    "id": "2",
    "isDefault": true,
    "name": "Medium",
    "statusColor": "#f79232"
    },
    {
    "description": "Minor problem or easily worked around.",
    "iconUrl": "/images/icons/priorities/low.svg",
    "id": "3",
    "isDefault": false,
    "name": "Low",
    "statusColor": "#707070"
    }
    ]
    }
  • Returns a paginated list of priority schemes.

    Permissions required: Permission to access Jira.

    Parameters

    • params: {
          expand?: string;
          maxResults?: string;
          onlyDefault?: boolean;
          orderBy?: "name" | "-name" | "+name";
          priorityId?: number[];
          schemeId?: number[];
          schemeName?: string;
          startAt?: string;
      } = {}
      • Optionalexpand?: string

        A comma separated list of additional information to return. "priorities" will return priorities associated with the priority scheme. "projects" will return projects associated with the priority scheme. expand=priorities,projects.

      • OptionalmaxResults?: string

        The maximum number of items to return per page.

      • OptionalonlyDefault?: boolean

        Whether only the default priority is returned.

      • OptionalorderBy?: "name" | "-name" | "+name"

        The ordering to return the priority schemes by.

      • OptionalpriorityId?: number[]

        A set of priority IDs to filter by. To include multiple IDs, provide an ampersand-separated list. For example, priorityId=10000&priorityId=10001.

      • OptionalschemeId?: number[]

        A set of priority scheme IDs. To include multiple IDs, provide an ampersand-separated list. For example, schemeId=10000&schemeId=10001.

      • OptionalschemeName?: string

        The name of scheme to search for.

      • OptionalstartAt?: string

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

    Returns Promise<PageBeanPrioritySchemeWithPaginatedPrioritiesAndProjects>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 1,
    "values": [
    {
    "description": "This is the default scheme used by all new and unassigned projects",
    "id": "1",
    "isDefault": true,
    "name": "Default Priority Scheme",
    "priorities": {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 3,
    "values": [
    {
    "description": "Serious problem that could block progress.",
    "iconUrl": "/images/icons/priorities/high.svg",
    "id": "1",
    "isDefault": false,
    "name": "High",
    "statusColor": "#f15C75"
    },
    {
    "description": "Has the potential to affect progress.",
    "iconUrl": "/images/icons/priorities/medium.svg",
    "id": "2",
    "isDefault": true,
    "name": "Medium",
    "statusColor": "#f79232"
    },
    {
    "description": "Minor problem or easily worked around.",
    "iconUrl": "/images/icons/priorities/low.svg",
    "id": "3",
    "isDefault": false,
    "name": "Low",
    "statusColor": "#707070"
    }
    ]
    },
    "projects": {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 1,
    "values": [
    {
    "avatarUrls": {
    "16x16": "secure/projectavatar?size=xsmall&pid=10000",
    "24x24": "secure/projectavatar?size=small&pid=10000",
    "32x32": "secure/projectavatar?size=medium&pid=10000",
    "48x48": "secure/projectavatar?size=large&pid=10000"
    },
    "id": "10000",
    "key": "EX",
    "name": "Example",
    "projectCategory": {
    "description": "Project category description",
    "id": "10000",
    "name": "A project category"
    },
    "projectTypeKey": "ProjectTypeKey{key='software'}",
    "self": "project/EX",
    "simplified": false
    }
    ]
    }
    }
    ]
    }
  • Returns a paginated list of projects by scheme.

    Permissions required: Permission to access Jira.

    Parameters

    • params: {
          maxResults?: string;
          projectId?: number[];
          query?: string;
          schemeId: string;
          startAt?: string;
      }
      • OptionalmaxResults?: string

        The maximum number of items to return per page.

      • OptionalprojectId?: number[]

        The project IDs to filter by. For example, projectId=10000&projectId=10001.

      • Optionalquery?: string

        The string to query projects on by name.

      • schemeId: string

        The priority scheme ID.

      • OptionalstartAt?: string

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

    Returns Promise<PageBeanProject>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 1,
    "values": [
    {
    "avatarUrls": {
    "16x16": "secure/projectavatar?size=xsmall&pid=10000",
    "24x24": "secure/projectavatar?size=small&pid=10000",
    "32x32": "secure/projectavatar?size=medium&pid=10000",
    "48x48": "secure/projectavatar?size=large&pid=10000"
    },
    "id": "10000",
    "key": "EX",
    "name": "Example",
    "projectCategory": {
    "description": "Project category description",
    "id": "10000",
    "name": "A project category"
    },
    "projectTypeKey": "ProjectTypeKey{key='software'}",
    "self": "project/EX",
    "simplified": false
    }
    ]
    }
  • Returns a paginated list of priorities that would require mapping, given a change in priorities or projects associated with a priority scheme.

    Permissions required: Permission to access Jira.

    Parameters

    Returns Promise<PageBeanPriorityWithSequence>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 3,
    "values": [
    {
    "description": "Serious problem that could block progress.",
    "iconUrl": "/images/icons/priorities/high.svg",
    "id": "1",
    "isDefault": false,
    "name": "High",
    "statusColor": "#f15C75"
    },
    {
    "description": "Has the potential to affect progress.",
    "iconUrl": "/images/icons/priorities/medium.svg",
    "id": "2",
    "isDefault": true,
    "name": "Medium",
    "statusColor": "#f79232"
    },
    {
    "description": "Minor problem or easily worked around.",
    "iconUrl": "/images/icons/priorities/low.svg",
    "id": "3",
    "isDefault": false,
    "name": "Low",
    "statusColor": "#707070"
    }
    ]
    }
  • Updates a priority scheme. This includes its details, the lists of priorities and projects in it

    Permissions required: Administer Jira global permission.

    Parameters

    Returns Promise<UpdatePrioritySchemeResponseBean>

    Returned if the request is accepted.

    example:

    {
    "task": {
    "self": "https://your-domain.atlassian.net/rest/api/3/task/1",
    "id": "1",
    "description": "Task description",
    "status": "COMPLETE",
    "result": "the task result, this may be any JSON",
    "submittedBy": 10000,
    "progress": 100,
    "elapsedRuntime": 156,
    "submitted": 1501708132800,
    "started": 1501708132900,
    "finished": 1501708133000,
    "lastUpdate": 1501708133000
    },
    "updated": {
    "description": "This is the default scheme used by all new and unassigned projects",
    "id": "1",
    "isDefault": true,
    "name": "Default Priority Scheme",
    "priorities": {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 3,
    "values": [
    {
    "description": "Serious problem that could block progress.",
    "iconUrl": "/images/icons/priorities/high.svg",
    "id": "1",
    "isDefault": false,
    "name": "High",
    "statusColor": "#f15C75"
    },
    {
    "description": "Has the potential to affect progress.",
    "iconUrl": "/images/icons/priorities/medium.svg",
    "id": "2",
    "isDefault": true,
    "name": "Medium",
    "statusColor": "#f79232"
    },
    {
    "description": "Minor problem or easily worked around.",
    "iconUrl": "/images/icons/priorities/low.svg",
    "id": "3",
    "isDefault": false,
    "name": "Low",
    "statusColor": "#707070"
    }
    ]
    },
    "projects": {
    "isLast": true,
    "maxResults": 50,
    "startAt": 0,
    "total": 1,
    "values": [
    {
    "avatarUrls": {
    "16x16": "secure/projectavatar?size=xsmall&pid=10000",
    "24x24": "secure/projectavatar?size=small&pid=10000",
    "32x32": "secure/projectavatar?size=medium&pid=10000",
    "48x48": "secure/projectavatar?size=large&pid=10000"
    },
    "id": "10000",
    "key": "EX",
    "name": "Example",
    "projectCategory": {
    "description": "Project category description",
    "id": "10000",
    "name": "A project category"
    },
    "projectTypeKey": "ProjectTypeKey{key='software'}",
    "self": "project/EX",
    "simplified": false
    }
    ]
    }
    }
    }
  • Method to initialize the class. Normally used to set up validation rules.

    Returns void