Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | deleteComment(commentId_or_mode[, issue]) | Package | | Alias | deleteComment(commentId, dispatchEvent),deleteComment(mode, issue, dispatchEvent) | | Pkg Usage | | |
Excerpt |
---|
|
Deletes a comment with the specified id, deletes the latest comment or deletes all comments from a given issue. |
...
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
commentId_or_mode | Number or String | Yes | Either the comment id (if we use the routine with only one parameter) or one of the next, otherwise:- "DELETE_LATEST" to delete the latest comment for the given issue - "DELETE_ALL" to delete all the comments for the given issue | issue key | String | NoYes | IssueKey. Should be used only if the mode is "DELETE_LATEST" or "DELETE_ALL" | dispatchEvent | Boolean | No | If set to false, the issue comment deleted event will not be triggered. Default value is true. | |
Number
The number of comments deleted.
Code Block |
---|
|
return deleteComment("DELETE_ALL", "TEST-1"); |
Deletes all comments from "TEST-1" and returns the number of comments deleted.
Code Block |
---|
return deleteComment("DELETE_ALL", "TEST-1", false); |
Deletes all comments from "TEST-1" and returns the number of comments deleted. The issue comment deleted event will not be triggered.
code |
return deleteComment("DELETE_LATEST", "TEST-2"); |
Deletes the latest comment from "TEST-2" and returns "1" because only one comment was deleted. If the comment cannot be deleted it will return "0".
Code Block |
---|
return deleteComment(12400); |
Deletes the comment with id 12400 and returns "1" because only one comment was deleted. If the comment cannot be deleted it will return " 0".
Code Block |
---|
return deleteComment(12400, false); |
Deletes the comment with id 12400 and returns "1" because only one comment was deleted. If the comment cannot be deleted it will return "0". The issue comment deleted event will not be triggered.
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "comment_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|