Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

addComment(issue, username, comment[, securityLevel, dispatchEvent])

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
SPosts Posts a comment on the specified issue on behalf of the specified user. Returns a number representing the id of the comment.

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

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.

securityLevel

String

No

Security level of comment. Security level can be a group or a role.

dispatchEvent

Boolean

No

If set to false, the issue commented event will not be triggered. Default value is trueOnly project roles are accepted for security level.

Return Type

Number

The returned number represents the id of the comment.

Examples

Example 1

Code Block
languagejs
addComment(key, currentUser(), "I have executed a transition.");

Adds a comment on the current issue, on behalf of the current user.

Example 2

Code Block
addComment(key, currentUser(), "you can't see me", "Administrators");

Adds a comment on the current issue, on behalf of the current user, viewable only by "Administrators".

Example 3

code
languagejs
addComment(key, currentUser(), "you can't see me", "Administrators", false);

Adds a comment on the current issue, on behalf of the current user, viewable only by "Administrators", that will not trigger the issue commented event.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "jira_comment_routine" and space = currentSpace ( )
labelsarray_routines