Endpoint Create Issue Comment
Name
create_comment
Description
Related Tables
Parameters
| Parameter | Required | Options |
|---|---|---|
|
Name:
Label: IssueId Or Key |
YES |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Id |
DT_WSTR
|
nvarchar(20)
|
20 | |
| Created |
DT_DBTIMESTAMP
|
datetime
|
||
| Updated |
DT_DBTIMESTAMP
|
datetime
|
||
| Self |
DT_WSTR
|
nvarchar(150)
|
150 | |
| BodyType |
DT_WSTR
|
nvarchar(50)
|
50 | |
| BodyContent |
DT_NTEXT
|
nvarchar(MAX)
|
||
| BodyContentText |
DT_NTEXT
|
nvarchar(MAX)
|
Join formatted text blocks using space separator (new lines will be lost) | |
| BodyVersion |
DT_NUMERIC
|
decimal(18,5)
|
||
| AuthorSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| AuthorAccountId |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AuthorEmailAddress |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AuthorAvatarUrls48x48 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AuthorAvatarUrls24x24 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AuthorAvatarUrls16x16 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AuthorAvatarUrls32x32 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AuthorDisplayName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AuthorActive |
DT_BOOL
|
bit
|
||
| AuthorTimeZone |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AuthorAccountType |
DT_WSTR
|
nvarchar(50)
|
50 | |
| UpdateAuthorSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| UpdateAuthorAccountId |
DT_WSTR
|
nvarchar(50)
|
50 | |
| UpdateAuthorEmailAddress |
DT_WSTR
|
nvarchar(100)
|
100 | |
| UpdateAuthorAvatarUrls48x48 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| UpdateAuthorAvatarUrls24x24 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| UpdateAuthorAvatarUrls16x16 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| UpdateAuthorAvatarUrls32x32 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| UpdateAuthorDisplayName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| UpdateAuthorActive |
DT_BOOL
|
bit
|
||
| UpdateAuthorTimeZone |
DT_WSTR
|
nvarchar(44)
|
44 | |
| UpdateAuthorAccountType |
DT_WSTR
|
nvarchar(36)
|
36 | |
| jsdPublic |
DT_BOOL
|
bit
|
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| IssueId |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| Body |
DT_NTEXT
|
nvarchar(MAX)
|
||
| BodyFormatted |
DT_NTEXT
|
nvarchar(MAX)
|
Examples
SSIS
Use Jira Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Destination
This Endpoint belongs to the Comments table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to create issue comment:
| Required Parameters | |
|---|---|
| IssueId Or Key | Fill-in the parameter... |
ODBC application
Use these SQL queries in your ODBC application data source:
Create a comment (plain text body)
<p>Creates a new plain-text comment on an issue. Supply the issue key or ID in <code>IssueId</code> and the comment text in <code>Body</code>. You can use functions such as <code><<FUN_NOW>></code> in the body.</p>
INSERT INTO Comments(IssueId,Body) VALUES('CS-2', 'Commented at <<FUN_NOW>>')
Create a comment (formatted body)
<p>Creates a new comment with formatted (ADF) content. Supply the issue key or ID and a JSON body that follows the Atlassian Document Format; the example shows a simple paragraph with text. Use <code>BodyFormatted</code> for the JSON string.</p>
INSERT INTO Comments(IssueId,BodyFormatted) VALUES('CS-3', '{ "content": [
{ "content": [
{ "text": "This is a valid ADF formatted comment.",
"type": "text" }
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}
}')
create_comment endpoint belongs to
Comments
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Create a comment (plain text body)
<p>Creates a new plain-text comment on an issue. Supply the issue key or ID in <code>IssueId</code> and the comment text in <code>Body</code>. You can use functions such as <code><<FUN_NOW>></code> in the body.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Comments(IssueId,Body) VALUES(''CS-2'', ''Commented at <<FUN_NOW>>'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Create a comment (formatted body)
<p>Creates a new comment with formatted (ADF) content. Supply the issue key or ID and a JSON body that follows the Atlassian Document Format; the example shows a simple paragraph with text. Use <code>BodyFormatted</code> for the JSON string.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Comments(IssueId,BodyFormatted) VALUES(''CS-3'', ''{ "content": [
{ "content": [
{ "text": "This is a valid ADF formatted comment.",
"type": "text" }
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}
}'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
create_comment endpoint belongs to
Comments
table(s), and can therefore be used via those table(s).