# Class: IssueClient

## IssueClient

## Constructor

#### new IssueClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/issue'

##### Parameters:

Name | Type | Description
--- | --- | ---
`jiraClient` | JiraClient |

Source:
  - api/issue.js, line 8

### Methods

#### addComment(opts, callback)

Add a comment to an issue

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`comment` | Object |  | See https://docs.atlassian.com/jira/REST/latest/#d2e482
`callback` |  |

Source:
  - api/issue.js, line 260

#### addWatcher(opts, callback)

Adds a user to an issue's watcher list.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`watcher` | string |  | The username of the user to add as a watcher.
`callback` |  | Called after the watcher is added.

Source:
  - api/issue.js, line 657

#### addWorkLog(opts, callback)

Adds a new worklog entry to an issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`adjustEstimate` | string | <optional> | Allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
    * "new" - sets the estimate to a specific value
    * "leave"- leaves the estimate as is
    * "manual" - specify a specific amount to increase remaining estimate by
    * "auto"- Default option. Will automatically adjust the value based on the
         new timeSpent specified on the worklog
`newEstimate` | string | <optional> | (required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. e.g. "2d"
`reduceBy` | string | <optional> | (required when "manual" is selected for adjustEstimate) the amount to reduce the remaining estimate by e.g. "2d"
`worklog` | Object |  | See {@link: https://docs.atlassian.com/jira/REST/latest/#d2e1106}
`callback` |  | Called after the worklog is added.

Source:
  - api/issue.js, line 716

#### assignIssue(opts, callback)

Assigns an issue to a user. You can use this resource to assign issues when the user submitting the request has the assign permission but not the edit issue permission. If the name is "-1" automatic assignee is used. A null name will remove the assignee.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`assignee` | string |  | The name of the user to whom to assign the issue. -1 for default, null for no assignee.
`callback` |  | Called when the issue has been assigned.

Source:
  - api/issue.js, line 217

#### bulkCreate(issues, callback)

Creates issues or sub-tasks from a JSON representation.

Creates many issues in one bulk operation.

Creating a sub-task is similar to creating a regular issue. More details can be found in createIssue section: IssueResource#createIssue(IssueUpdateBean)}

##### Parameters:

Name | Type | Description
--- | --- | ---
`issues` |  | See https://docs.atlassian.com/jira/REST/latest/#d2e828
`callback` |  | Called when the issues have been created.

Source:
  - api/issue.js, line 97

#### createIssue(issue, callback)

Creates an issue or a sub-task from a JSON representation.

The fields that can be set on create, in either the fields parameter or the update parameter can be determined using the /rest/api/2/issue/createmeta resource. If a field is not configured to appear on the create screen, then it will not be in the createmeta, and a field validation error will occur if it is submitted.

Creating a sub-task is similar to creating a regular issue, with two important differences:

- the issueType field must correspond to a sub-task issue type (you can use /issue/createmeta to discover sub-task issue types), and
- you must provide a parent field in the issue create request containing the id or key of the parent issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`issue` | Object | The issue data in the form of POST body to the JIRA API. See https://docs.atlassian.com/jira/REST/latest/#d2e398
`callback` |  | Called when the issue has been created.

Source:
  - api/issue.js, line 16

#### createRemoteLink(opts, callback)

Creates (or updates) a remote issue link from a JSON representation. If a globalId is provided and a remote issue link exists with that globalId, the remote issue link is updated. Otherwise, the remote issue link is created.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`remoteLink` | Object |  | See https://docs.atlassian.com/jira/REST/latest/#d2e945
`callback` |  | Called when the remote links are retrieved.

Source:
  - api/issue.js, line 408

#### deleteComment(opts, callback)

Delete an existing comment.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`commentId` | string |  | The id of the comment.
`callback` |  | Called when the comment is retrieved.

Source:
  - api/issue.js, line 323

#### deleteIssue(opts, callback)

Delete an issue. If the issue has subtasks you must set the parameter deleteSubtasks=true to delete the issue. You cannot delete an issue without its subtasks also being deleted.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`deleteSubTasks` | boolean | <optional> | "a String of true or false indicating that any subtasks should also be deleted. If the issue has no subtasks this parameter is ignored. If the issue has subtasks and this parameter is missing or false, then the issue will not be deleted and an error will be returned."
`callback` |  |

Source:
  - api/issue.js, line 165

#### deleteRemoteLink(opts, callback)

Delete the remote issue link with the given global id on the issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`globalId` | string |  | The global id of the remote issue link
`callback` |  | Called when the remote links are retrieved.

Source:
  - api/issue.js, line 445

#### deleteRemoteLinkById(opts, callback)

Get the remote issue link with the given id on the issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`linkId` | string |  | The id of the remote link
`callback` |  | Called when the remote links are retrieved.

Source:
  - api/issue.js, line 512

#### deleteWorkLog(opts, callback)

Deletes an existing worklog entry

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`worklogId` | string |  | The id of the work log to delete.
`adjustEstimate` | string | <optional> | Allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
    * "new" - sets the estimate to a specific value
    * "leave"- leaves the estimate as is
    * "manual" - specify a specific amount to increase remaining estimate by
    * "auto"- Default option. Will automatically adjust the value based on the
         new timeSpent specified on the worklog
`newEstimate` | string | <optional> | (required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. e.g. "2d"
`increaseBy` | string | <optional> | (required when "manual" is selected for adjustEstimate) the amount to reduce the remaining estimate by e.g. "2d"
`callback` |  | Called after the work log is deleted.

Source:
  - api/issue.js, line 809

#### editComment(opts, callback)

Updates an existing comment using its JSON representation.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`commentId` | string |  | The id of the comment.
`comment` | Object |  | See https://docs.atlassian.com/jira/REST/latest/#d2e539
`callback` |  |

Source:
  - api/issue.js, line 299

#### editIssue(opts, callback)

Edits an issue from a JSON representation.

The issue can either be updated by setting explicit the field value(s) or by using an operation to change the field value.

The fields that can be updated, in either the fields parameter or the update parameter, can be determined using the IssueClient#getEditMetadata method. If a field is not configured to appear on the edit screen, then it will not be in the editmeta, and a field validation error will occur if it is submitted.

Specifying a "field_id": field_value in the "fields" is a shorthand for a "set" operation in the "update" section. Field should appear either in "fields" or "update", not in both.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`issue` | Object |  | See https://docs.atlassian.com/jira/REST/latest/#d2e656
`callback` |  |

Source:
  - api/issue.js, line 186

#### getComment(opts, callback)

Get a specific comment.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`commentId` | string |  | The id of the comment.
`callback` |  | Called when the comment is retrieved.

Source:
  - api/issue.js, line 278

#### getComments(opts, callback)

Get all the comments for an issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`expand` | Object |  | See https://docs.atlassian.com/jira/REST/latest/#d2e461
`callback` |  | Called when the issue has been assigned.

Source:
  - api/issue.js, line 242

#### getCreateMetadata(optsopt, callback)

Returns the meta data for creating issues. This includes the available projects, issue types and fields, including field types and whether or not those fields are required. Projects will not be returned if the user does not have permission to create issues in that project.

The fields in the createmeta correspond to the fields in the create screen for the project/issuetype. Fields not in the screen will not be in the createmeta.

Fields will only be returned if `expand=projects.issuetypes.fields.`

The results can be filtered by project and/or issue type, given by the query params.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`opts` | Object | <optional> | The options for the API request. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`projectIds` | string | <optional> | combined with the projectKeys param, lists the projects with which to filter the results. If absent, all projects are returned. This parameter can be specified multiple times, and/or be a comma-separated list. Specifiying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.
`projectKeys` | string | <optional> | combined with the projectIds param, lists the projects with which to filter the results. If null, all projects are returned. This parameter can be specified multiple times, and/or be a comma-separated list. Specifiying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.
`issuetypeIds` | string | <optional> | combinded with issuetypeNames, lists the issue types with which to filter the results. If null, all issue types are returned. This parameter can be specified multiple times, and/or be a comma-separated list. Specifiying an issue type that does not exist is not an error.
`issuetypeNames` | string | <optional> | combinded with issuetypeIds, lists the issue types with which to filter the results. If null, all issue types are returned. This parameter can be specified multiple times, but is NOT interpreted as a comma-separated list. Specifiying an issue type that does not exist is not an error.
`expand` | string | <optional> | in order to get expanded field descriptions, specify 'projects.issuetypes.fields' here.
`callback` |  |  | Called when the metadata has been retrieved.

Source:
  - api/issue.js, line 47

#### getEditMetadata(opts, callback)

Returns the meta data for editing an issue.

The fields in the editmeta correspond to the fields in the edit screen for the issue. Fields not in the screen will not be in the editemeta.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`callback` |  | Called when the metadata is retrieved.

Source:
  - api/issue.js, line 344

#### getIssue(opts, callback)

Returns a full representation of the issue for the given issue key.

An issue JSON consists of the issue key, a collection of fields, a link to the workflow transition sub-resource, and (optionally) the HTML rendered values of any fields that support it (e.g. if wiki syntax is enabled for the description or comments).

The fields param (which can be specified multiple times) gives a comma-separated list of fields to include in the response. This can be used to retrieve a subset of fields. A particular field can be excluded by prefixing it with a minus.

By default, all (*all) fields are returned in this get-issue resource. Note: the default is different when doing a jql search -- the default there is just navigable fields (*navigable).

- *all - include all fields
- *navigable - include just navigable fields
- summary,comment - include just the summary and comments
- -comment - include everything except comments (the default is *all for get-issue)
- *all,-comment - include everything except comments

JIRA will attempt to identify the issue by the issueIdOrKey path parameter. This can be an issue id, or an issue key. If the issue cannot be found via an exact match, JIRA will also look for the issue in a case-insensitive way, or by looking to see if the issue was moved. In either of these cases, the request will proceed as normal (a 302 or other redirect will not be returned). The issue key contained in the response will indicate the current value of issue's key.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`fields` | Object | <optional> | See https://docs.atlassian.com/jira/REST/latest/#d2e611
`expand` | Object | <optional> | See https://docs.atlassian.com/jira/REST/latest/#d2e611
`callback` |  |

Source:
  - api/issue.js, line 122

#### getProperties(opts, callback)

Returns the keys of all properties for the issue identified by the key or by the id. This function is maked as experimental in the Jira API docs, use at your own risk.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`callback` |  | Called when the properties are retrieved.

Source:
  - api/issue.js, line 872

#### getProperty(opts, callback)

Removes the property from the issue identified by the key or by the id. Ths user removing the property is required to have permissions to edit the issue.

This function is maked as experimental in the Jira API docs, use at your own risk.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`propertyKey` | string |  | The key of the property being set.
`callback` |  | Called when the property is deleted.

Source:
  - api/issue.js, line 939

#### getProperty(opts, callback)

Returns the value of the property with a given key from the issue identified by the key or by the id. The user who retrieves the property is required to have permissions to read the issue.

This function is maked as experimental in the Jira API docs, use at your own risk.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`propertyKey` | string |  | The key of the property being set.
`callback` |  | Called when the property is retrieved.

Source:
  - api/issue.js, line 916

#### getRemoteLinkById(opts, callback)

Get the remote issue link with the given id on the issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`linkId` | string |  | The id of the remote link
`callback` |  | Called when the remote links are retrieved.

Source:
  - api/issue.js, line 467

#### getRemoteLinks(opts, callback)

Get a REST sub-resource representing the remote issue links on the issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`globalId` | string |  | The id of the remote issue link to be returned. If null (not provided) all remote links for the issue are returned. For a full explanation of Issue Link fields please refer to https://developer.atlassian.com/display/JIRADEV/Fields+in+Remote+Issue+Links
`callback` |  | Called when the remote links are retrieved.

Source:
  - api/issue.js, line 388

#### getTransitions(opts, callback)

Get a list of the transitions possible for this issue by the current user, along with fields that are required and their types.

Fields will only be returned if `expand=transitions.fields.`

The fields in the metadata correspond to the fields in the transition screen for that transition. Fields not in the screen will not be in the metadata.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`transitionId` | string |  | If specified, will call back with only the transition with the specified id.
`callback` |  | Called when the transitions are retrieved.

Source:
  - api/issue.js, line 534

#### getVotes(opts, callback)

Get a REST sub-resource representing the voters on the issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`callback` |  | Called after the votes are retrieved.

Source:
  - api/issue.js, line 623

#### getWatchers(opts, callback)

Returns the list of watchers for the issue with the given key.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`callback` |  | Called after the watchers are retrieved.

Source:
  - api/issue.js, line 640

#### getWorkLog(opts, callback)

Gets a specific worklog.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`worklogId` | string |  | The id of the work log to retrieve.
`callback` |  | Called after the worklog is retrieved.

Source:
  - api/issue.js, line 752

#### getWorkLogs(opts, callback)

Gets all work logs for an issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`callback` |  | Called after the worklogs are retrieved.

Source:
  - api/issue.js, line 699

#### removeWatcher(opts, callback)

Adds a user to an issue's watcher list.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`watcher` | string |  | The username of the user to remove as a watcher.
`callback` |  | Called after the watcher is removed.

Source:
  - api/issue.js, line 678

#### sendEmailNotification(opts, callback)

Sends a notification (email) to the list or recipients defined in the request. A couple of notes: this may call back with the error 'No recipients were defined for notification.' if all of the intended recipients have disabled notifications from Jira.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`notification` | Object |  | See https://docs.atlassian.com/jira/REST/latest/#d2e435
`callback` |  | Called when the metadata is retrieved.

Source:
  - api/issue.js, line 364

#### setProperty(opts, callback)

Sets the value of the specified issue's property. You can use this resource to store a custom data against the issue identified by the key or by the id. The user who stores the data is required to have permissions to edit the issue.

This function is maked as experimental in the Jira API docs, use at your own risk.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`propertyKey` | string |  | The key of the property being set.
`propertyValue` | Object |  | The value of the property being set.
`callback` |  | Called when the property is set.

Source:
  - api/issue.js, line 889

#### transitionIssue(opts, callback)

Perform a transition on an issue. When performing the transition you can udate or set other issue fields.

The fields that can be set on transtion, in either the fields parameter or the update parameter can be determined using the /rest/api/2/issue/{issueIdOrKey}/transitions?expand=transitions.fields resource. If a field is not configured to appear on the transition screen, then it will not be in the transition metadata, and a field validation error will occur if it is submitted.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`transition` | string |  | See https://docs.atlassian.com/jira/REST/latest/#d2e698
`callback` |  | Called when the transitions are retrieved.

Source:
  - api/issue.js, line 558

#### unvote(opts, callback)

Remove your vote from an issue. (i.e. "unvote")

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`callback` |  | Called after the vote is removed.

Source:
  - api/issue.js, line 589

#### updateRemoteLink(opts, callback)

Updates (or creates) a remote issue link from a JSON representation. If a globalId is provided and a remote issue link exists with that globalId, the remote issue link is updated. Otherwise, the remote issue link is created.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`remoteLink` | Object |  | See https://docs.atlassian.com/jira/REST/latest/#d2e945
`callback` |  | Called when the remote links are retrieved.

Source:
  - api/issue.js, line 427

#### updateRemoteLinkById(opts, callback)

Get the remote issue link with the given id on the issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`linkId` | string |  | The id of the remote link
`remoteLink` | string |  | See https://docs.atlassian.com/jira/REST/latest/#d2e1037
`callback` |  | Called when the remote links are retrieved.

Source:
  - api/issue.js, line 489

#### updateWorkLog(opts, callback)

Updates an existing worklog entry using its JSON representation.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`worklogId` | string |  | The id of the work log to retrieve.
`adjustEstimate` | string | <optional> | Allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
    * "new" - sets the estimate to a specific value
    * "leave"- leaves the estimate as is
    * "auto"- Default option. Will automatically adjust the value based on the
         new timeSpent specified on the worklog
`newEstimate` | string | <optional> | (required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. e.g. "2d"
`worklog` | Object |  | See {@link: https://docs.atlassian.com/jira/REST/latest/#d2e1161}
`callback` |  | Called after the worklog is updated.

Source:
  - api/issue.js, line 773

#### vote(opts, callback)

Cast your vote in favour of an issue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` | Object | The options to pass to the API. Note that this object must contain EITHER an issueId or issueKey property; issueId will be used over issueKey if both are present. ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`issueId` | string | <optional> | The id of the issue. EX: 10002
`issueKey` | string | <optional> | The Key of the issue. EX: JWR-3
`callback` |  | Called after the vote is removed.

Source:
  - api/issue.js, line 606