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 | addJSDComment(issue, username, comment, | |
...
isPublic, dispachEvent) | Package | | Alias | | Pkg Usage | |
|
Excerpt |
---|
|
Posts a comment on the specified issue on behalf of the specified user. |
Posts a comment on the specified issue on behalf of the specified user. Returns a number representing the id of the comment.
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
issue key | String | Yes | Key of the selected issue | user name | String | Yes | User name of the selected user | comment | String | Yes | Comment that will be posted on the selected issue | isPublic | Boolean | No | “true” for public comment or “false” for internal comment, the default is "true" | dispachEvent (deprecated) | Boolean | No | “true” if you want to dispach the | |
...
commentAdded event and “false” if not, the default is "true". |
|
...
In newer versions of Service Desk, the API responsible for this feature was deprecated, and Atlassian doesn't use this parameter in newer versions. Please don't use this property for this method. |
|
...
numberNumber
The returned number represents the id of the comment.
Use the following code to add a public comment to the current issue on issueon behalf of the current user. The commentAdded event will be dispached.
Code Block |
---|
addJSDComment(key, currentUser(), "I have executed a transition."); |
The same can also be achieved with the following script:
Code Block |
---|
addJSDComment(key, currentUser(), "I have executed a transition.", true); |
Use the following code to add an internal comment to the current issue on issueon behalf of the current user. The commentAdded event will be dispached.
Code Block |
---|
addJSDComment(key, currentUser(), "you can't see me", false); |
The same can also be achieved with the following script:
Code Block |
---|
addJSDComment(key, currentUser(), "you can't see me", false, true); |
Note |
---|
In the newer versions of Service Desk, the API responsible for the dispatchEvent attribute was deprecated, and Atlassian doesn't use this parameter any more. Don't use this property for this method. This means you should not be using the last attribute, "true " in this example. Thus, your code should look like this: Code Block | addJSDComment(key, currentUser(), "you can't see me", false); |
Use the following code to add an an internal comment comment to the current issue on issue on behalf of the current user. The commentAdded event will not be dispached.
Code Block |
---|
addJSDComment(key, currentUser(), "you can't see me", false, false); |
note |
In the newer versions of Service Desk, the API responsible for the dispatchEvent attribute was deprecated, and Atlassian doesn't use this parameter in newer versions. Don't use this property for this method.
...
This means you should not be using the last attribute, "false" in this example. Thus, your code should look like this:
Code Block |
---|
addJSDComment(key, currentUser(), "you can't see me", false); |
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label in ( "ps_routines" , "= "jsd_routine" and space = currentSpace ( ) |
---|
labels | jiraarray_comment_routineroutines |
---|
|