This resource represents issue properties, which provides for storing custom data against an issue. Use it to get, set, and delete issue properties as well as obtain details of all properties on an issue. Operations to bulk update and delete issue properties are also provided. Issue properties are a type of entity property.

Hierarchy

  • CommonHttpService
    • IssuePropertiesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns IssuePropertiesService

Methods

  • Deletes a property value from multiple issues. The issues to be updated can be specified by filter criteria.

    The criteria the filter used to identify eligible issues are:

    • entityIds Only issues from this list are eligible.
    • currentValue Only issues with the property set to this value are eligible.

    If both criteria is specified, they are joined with the logical AND: only issues that satisfy both criteria are considered eligible.

    If no filter criteria are specified, all the issues visible to the user and where the user has the EDIT_ISSUES permission for the issue are considered eligible.

    This operation is:

    • transactional, either the property is deleted from all eligible issues or, when errors occur, no properties are deleted.
    • asynchronous. Follow the location link in the response to determine the status of the task and use Get task to obtain subsequent updates.

    Permissions required:

    Parameters

    Returns Promise<void>

    DELETE /rest/api/3/issue/properties/{propertyKey} @scopes-current write:jira-work @scopes-beta delete:issue.property:jira

  • Sets a property value on multiple issues.

    The value set can be a constant or determined by a Jira expression. Expressions must be computable with constant complexity when applied to a set of issues. Expressions must also comply with the restrictions that apply to all Jira expressions.

    The issues to be updated can be specified by a filter.

    The filter identifies issues eligible for update using these criteria:

    • entityIds Only issues from this list are eligible.

    • currentValue Only issues with the property set to this value are eligible.

    • hasProperty:

      • If true, only issues with the property are eligible.
      • If false, only issues without the property are eligible.

    If more than one criteria is specified, they are joined with the logical AND: only issues that satisfy all criteria are eligible.

    If an invalid combination of criteria is provided, an error is returned. For example, specifying a currentValue and hasProperty as false would not match any issues (because without the property the property cannot have a value).

    The filter is optional. Without the filter all the issues visible to the user and where the user has the EDIT_ISSUES permission for the issue are considered eligible.

    This operation is:

    • transactional, either all eligible issues are updated or, when errors occur, none are updated.
    • asynchronous. Follow the location link in the response to determine the status of the task and use Get task to obtain subsequent updates.

    Permissions required:

    Parameters

    Returns Promise<void>

    PUT /rest/api/3/issue/properties/{propertyKey} @scopes-current write:jira-work @scopes-beta read:jira-expressions:jira, write:issue.property:jira

  • Sets or updates a list of entity property values on issues. A list of up to 10 entity properties can be specified along with up to 10,000 issues on which to set or update that list of entity properties.

    The value of the request body must be a valid, non-empty JSON. The maximum length of single issue property value is 32768 characters. This operation can be accessed anonymously.

    This operation is:

    • transactional, either all properties are updated in all eligible issues or, when errors occur, no properties are updated.
    • asynchronous. Follow the location link in the response to determine the status of the task and use Get task to obtain subsequent updates.

    Permissions required:

    Parameters

    Returns Promise<void>

    POST /rest/api/3/issue/properties @scopes-current write:jira-work @scopes-beta write:issue.property:jira

  • Sets the value of an issue's property. Use this resource to store custom data against an issue.

    The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.

    This operation can be accessed anonymously.

    Permissions required:

    Parameters

    • params: {
          issueIdOrKey: string;
          propertyKey: string;
          requestBody: unknown;
      }
      • issueIdOrKey: string

        The ID or key of the issue.

      • propertyKey: string

        The key of the issue property. The maximum length is 255 characters.

      • requestBody: unknown

        The value of the property. The value has to be a valid, non-empty JSON value. The maximum length of the property value is 32768 bytes.

    Returns Promise<{
        body: unknown;
        created: boolean;
    }>

    • status: 200, mediaType: application/json

      Returned if the issue property is updated.

    • status: 201, mediaType: application/json

      Returned if the issue property is created.

    PUT /rest/api/3/issue/{issueIdOrKey}/properties/{propertyKey} @scopes-current write:jira-work @scopes-beta write:issue.property:jira

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void