Info | ||
---|---|---|
| ||
|
Syntax
editComment(commentId, comment)
or
editComment(commentId, comment, securityLevel)
Tip | ||
---|---|---|
| ||
Starting with sil engine 4.8.0.3, "dispatchEvent" parameter was added. It allows to trigger or not the issue commented event. (Just for server) |
editComment(commentId, comment, dispatchEvent)
...
Table plus | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Description
Excerpt | ||
---|---|---|
| ||
Edits a comment with the specified id and text. |
Edits a comment with the specified id and text. Optional, you can edit the security level for comment. Returns the comment representation after the edit.
Parameters
...
Parameter name
...
Type
...
Required
...
Description
...
The key of the issue.
Note |
---|
On the server version, the issue key parameter doesn't exist, while on the cloud version it is mandatory, and the order of the parameters should be as follows: |
...
commentId
...
Table plus | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
...
|
...
|
...
|
...
|
...
...
This parameter is available just on the server version.
...
Return Type
JComment
The comment representation with the following keys:
...
Key name
...
Description
...
id
...
Id of the issue comment.
...
Example
...
Examples
Example 1
Code Block |
---|
string newComm = "This comment was edited.";
return editComment(11801, newComm);
|
Edits the comment with id 11801 with the specified text.
...
Code Block |
---|
string newComm = "This comment was edited.";
return editComment(11801, newComm, false);
|
Edits the comment with id 11801 with the specified text, the issue comment edited event will not be triggered.
...
Code Block |
---|
JComment jcomment = getCommentById(11801); string oldComm = jcomment["text"]; string newComm = oldComm + "\nEditing the comment"; return editComment (11801, newComm, "Developers"); |
Edits a comment by adding new text to the old one and that can be viewed only by "Developers".
...
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|