Comments
Manages comments added to issues. Supports creating, reading, updating, and deleting issue comments.
Table Specific Information
Select
You can query this table to retrieve comments posted on all issues.
The 本製品 uses the Jira API to process some of the filters.
The 本製品 processes other filters within the 本製品.
For example, the following queries are processed server side:
SELECT * FROM Comments
To retrieve comments associated with a specific issue, query the
Comments table by specifying either the IssueId or IssueKey column.
SELECT * FROM Comments WHERE IssueId = 10003
To retrieve comments associated to issues within a specific project, query the
Comments table by specifying either the ProjectId or ProjectName column.
SELECT * FROM Comments WHERE ProjectId = 10100
Additionally, the Created column can be used in the ORDER BY clause:
SELECT * FROM Comments WHERE IssueId = 10003 ORDER BY Created DESC
Filtering with IssueId comparison operators
Due to limitations in the Jira API, filtering with comparison operators on the IssueId column (>, >=, <, <=) only works reliably within the context of the project that contains the specified issue. To improve behavior, the 本製品 transforms these comparisons into equivalent filters on the IssueCreatedDate column by resolving the Created datetime of each referenced issue.
This transformation is applied only when the KeyColumnOperators connection property is set to "Server-Side" (the default). In rare cases, 本製品 may assign a higher IssueId to an issue created earlier, which can result in incorrect filtering when relying solely on IssueId comparisons. For fully accurate results across all projects, set KeyColumnOperators to "Client-Side". This mode retrieves the entire issue dataset and evaluates the comparison logic client-side providing a correct result set at the cost of performance.
Consider the example query below.
SELECT * FROM Comments WHERE IssueId > '10005'
When KeyColumnOperators is set to "Server-Side", this is internally transformed into:
SELECT * FROM Comments WHERE IssueCreatedDate > '2024-11-26T10:08:51Z'
Insert
Post a comment as the logged in user. IssueId and Body are required.
INSERT INTO Comments (IssueId, Body) VALUES ('10003', 'Test Comment')
Update
Only the body of the comment can be updated. The IssueId is required for an UPDATE as well.
UPDATE Comments SET Body = 'Updated Comment' WHERE Id = 10202 AND IssueId = 10003
Delete
Delete a comment posted in an issue by providing the Id and IssueId
DELETE FROM Comments WHERE Id = 10202 AND IssueId = 10003
Columns
| Name | Type | ReadOnly | References | SupportedOperators | Platform | Description |
| Id [KEY] | Integer | True | = | Common |
The unique identifier assigned to the comment within the Jira system. | |
| IssueId [KEY] | Integer | False |
Issues.Id | =,<>,>,>=,<,<=,IN,NOT IN | Common |
The numeric ID of the issue that the comment is associated with. This ID is internal to Jira. |
| IssueKey | String | False |
Issues.Key | =,<>,>,>=,<,<=,IN,NOT IN | Common |
The issue key linked to the comment, such as 'PROJ-101', which uniquely identifies the issue in a human-readable format. |
| ProjectId | Integer | True |
Projects.Id | =,IS,IS NOT,IN,NOT IN | Common |
The numeric ID of the project that contains the issue the comment belongs to. |
| ProjectName | String | True | =,IS,IS NOT,IN,NOT IN | Common |
The name of the project that includes the issue associated with this comment. | |
| IssueCreatedDate | Datetime | True | =,<>,>,>=,<,<=,IS,IS NOT,IN,NOT IN | Common |
The date and time when the issue linked to this comment was originally created. | |
| IssueUpdatedDate | Datetime | True | =,<>,>,>=,<,<=,IS,IS NOT,IN,NOT IN | Common |
The date and time when the issue related to this comment was last updated. | |
| AuthorDisplayName | String | True |
Users.DisplayName | Common |
The full display name of the user who originally created the comment. | |
| AuthorEmail | String | True |
Users.EmailAddress | Common |
The email address associated with the user who created the comment. | |
| UpdateDisplayName | String | True |
Users.DisplayName | Common |
The full display name of the user who last updated or edited the comment. | |
| UpdateAuthorEmail | String | True |
Users.EmailAddress | Common |
The email address of the user who most recently modified the comment. | |
| Body | String | False | Common |
The raw content of the comment, typically in plain text or markup, as entered by the author. | ||
| RenderedBody | String | True | Common |
The processed version of the comment body, rendered in HTML or another display format for the user interface. | ||
| Created | Datetime | True | Common |
The timestamp indicating when the comment was first submitted. | ||
| Updated | Datetime | True | Common |
The timestamp indicating the most recent update to the comment, if applicable. | ||
| VisibilityType | String | False | Common |
The method used to restrict comment visibility, such as by group or project role. | ||
| VisibilityValue | String | False | Common |
The specific group name or role name used to control who can view the comment. | ||
| AuthorAccountName | String | True | Server |
The username of the Jira account that created the comment. | ||
| AuthorAccountKey | String | True | Server |
The unique Jira user key corresponding to the account that authored the comment. | ||
| UpdateAuthorAccountKey | String | True | Server |
The unique Jira user key of the account that last modified the comment. | ||
| UpdateAuthorAccountName | String | True | Server |
The username of the user who most recently edited the comment. | ||
| AuthorAccountId | String | True |
Users.AccountId | Cloud |
The Jira account ID of the user who originally posted the comment. This ID is used in API interactions. | |
| UpdateAuthorAccountId | String | True |
Users.AccountId | Cloud |
The Jira account ID of the user who most recently updated the comment. This is used for audit tracking. | |
| ItemURL | String | True | Common |
A URL pointing directly to the comment, allowing users to open it in the Jira interface. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| JQL | String |
A Jira Query Language (JQL) expression used to retrieve issues with specific comment criteria, such as author or date range. |