Skip to content

Commit 199eb7b

Browse files
authored
Add support for passing along accountID when adding watcher to Jira issue (#188)
* Add support for passing along accountID when adding watcher * Added accountId to version2
1 parent c30211c commit 199eb7b

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

src/version2/issueWatchers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ export class IssueWatchers {
9292
const config: RequestConfig = {
9393
url: `/rest/api/2/issue/${parameters.issueIdOrKey}/watchers`,
9494
method: 'POST',
95+
headers: {
96+
'Content-Type': 'application/json',
97+
},
98+
data: parameters.accountId,
9599
};
96100

97101
return this.client.sendRequest(config, callback);

src/version2/parameters/addWatcher.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export interface AddWatcher {
22
/** The ID or key of the issue. */
33
issueIdOrKey: string;
4+
5+
/** Account id for specific user. */
6+
accountId?: string;
47
}

src/version3/issueWatchers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ export class IssueWatchers {
141141
const config: RequestConfig = {
142142
url: `/rest/api/3/issue/${parameters.issueIdOrKey}/watchers`,
143143
method: 'POST',
144+
headers: {
145+
'Content-Type': 'application/json',
146+
},
147+
data: parameters.accountId,
144148
};
145149

146150
return this.client.sendRequest(config, callback);

src/version3/parameters/addWatcher.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export interface AddWatcher {
22
/** The ID or key of the issue. */
33
issueIdOrKey: string;
4+
5+
/** Account id for specific user. */
6+
accountId?: string;
47
}

0 commit comments

Comments
 (0)