This resource represents votes cast by users on an issue. Use it to get details of votes on an issue as well as cast and withdrawal votes.

Hierarchy

  • CommonHttpService
    • IssueVotesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns IssueVotesService

Methods

  • Returns details about the votes on an issue.

    This operation requires the Allow users to vote on issues option to be ON. This option is set in General configuration for Jira. See Configuring Jira application options for details.

    This operation can be accessed anonymously.

    Permissions required:

    Note that users with the necessary permissions for this operation but without the View voters and watchers project permissions are not returned details in the voters field.

    Parameters

    • params: {
          issueIdOrKey: string;
      }
      • issueIdOrKey: string

        The ID or key of the issue.

    Returns Promise<Votes>

    Returned if the request is successful.

    example:

    {
    "hasVoted": true,
    "self": "https://your-domain.atlassian.net/rest/api/issue/MKY-1/votes",
    "voters": [
    {
    "accountId": "5b10a2844c20165700ede21g",
    "accountType": "atlassian",
    "active": false,
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    },
    "displayName": "Mia Krystof",
    "key": "",
    "name": "",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
    }
    ],
    "votes": 24
    }

    GET /rest/api/3/issue/{issueIdOrKey}/votes @scopes-current read:jira-work @scopes-beta read:issue.vote:jira, read:user:jira, read:application-role:jira, read:avatar:jira, read:group:jira

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

    Returns void