Watchers
Query, insert and delete the available issue Watchers in Jira.
Select
The add-in will use the Jira APIs to process filters based on IssueId or IssueKey. One of these is required to retrieve results. IssueId and IssueKey can be used only with the equal (=) operator.
The add-in will execute other filters client-side within itself.
For example, the following query is processed server side:
SELECT * FROM Watchers WHERE IssueId = '10100' SELECT * FROM Watchers WHERE IssueKey = 'PRJ-1'
Insert
Adds a new watcher to an existing issue.
Cloud
To add a new watcher to a specific issue, you must specify the AccountId of the user and either the IssueId or IssueKey of the issue.
INSERT INTO Watchers (IssueId, AccountId) values(19393, '63acbf336f068efec8f6e0c3')
INSERT INTO Watchers (IssueKey, AccountId) values('CD-352', '63acbf336f068efec8f6e0c3')
Sever
To add a new watcher to a specific issue, you must specify the Name of the user and either the IssueId or IssueKey of the issue.
INSERT INTO Watchers (IssueId, Name) values(19393, 'CDataUser')
INSERT INTO Watchers (IssueKey, Name) values('CD-352', 'CDataUser')
Delete
Removes a watcher from an existing issue.
Cloud
To remove a watcher from a specific issue, you must specify the AccountId of the user and either the IssueId or IssueKey of the issue.
DELETE Watchers WHERE IssueId=19393 AND AccountId='63acbf336f068efec8f6e0c3' DELETE Watchers WHERE IssueKey='CD-352' AND AccountId='63acbf336f068efec8f6e0c3'
Sever
To remove a watcher from a specific issue, you must specify the Name of the user and either the IssueId or IssueKey of the issue.
DELETE Watchers WHERE IssueId=19393 AND Name='CDataUser' DELETE Watchers WHERE IssueKey='CD-352' AND Name='CDataUser'
Columns
| Name | Type | ReadOnly | References | SupportedOperators | Platform | Description |
| DisplayName | String | True | Common |
The displayed name of the watcher. | ||
| EmailAddress | String | True | Common |
The email address of the watcher. | ||
| AccountId [KEY] | String | False |
Users.AccountId | Cloud |
The accountId of the watcher. | |
| Key [KEY] | String | True | Server |
The account key of the watcher. | ||
| Name | String | False | Server |
The name of the watcher. | ||
| IssueId [KEY] | String | False | =,EMP_EQ | Common |
The issue Id of the watcher. | |
| IssueKey | String | False | =,EMP_EQ | Common |
The issue key of the watcher. |