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

    • params: {
          createPrioritySchemeDetails: CreatePrioritySchemeDetails;
      }
      • createPrioritySchemeDetails: CreatePrioritySchemeDetails
        {
        "defaultPriorityId": 10001,
        "description": "My priority scheme description",
        "mappings": {
        "in": {
        "10002": 10000,
        "10005": 10001,
        "10006": 10001,
        "10008": 10003
        },
        "out": {}
        },
        "name": "My new priority scheme",
        "priorityIds": [
        10000,
        10001,
        10003
        ],
        "projectIds": [
        10005,
        10006,
        10007
        ]
        }

    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

    • params: {
          suggestedMappingsRequestBean: SuggestedMappingsRequestBean;
      }
      • suggestedMappingsRequestBean: SuggestedMappingsRequestBean
        {
        "maxResults": 50,
        "priorities": {
        "add": [
        10001,
        10002
        ],
        "remove": [
        10003
        ]
        },
        "projects": {
        "add": [
        10021
        ]
        },
        "schemeId": 10005,
        "startAt": 0
        }

    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

    • params: {
          schemeId: number;
          updatePrioritySchemeRequestBean: UpdatePrioritySchemeRequestBean;
      }
      • schemeId: number

        The ID of the priority scheme.

      • updatePrioritySchemeRequestBean: UpdatePrioritySchemeRequestBean
        {
        "defaultPriorityId": 10001,
        "description": "My priority scheme description",
        "mappings": {
        "in": {
        "10003": 10002,
        "10004": 10001
        },
        "out": {
        "10001": 10005,
        "10002": 10006
        }
        },
        "name": "My new priority scheme",
        "priorities": {
        "add": {
        "ids": [
        10001,
        10002
        ]
        },
        "remove": {
        "ids": [
        10003,
        10004
        ]
        }
        },
        "projects": {
        "add": {
        "ids": [
        10101,
        10102
        ]
        },
        "remove": {
        "ids": [
        10103,
        10104
        ]
        }
        }
        }

    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