Skip to end of banner
Go to start of banner

getCommentById

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Availability

  • This routine is available starting with SIL Engine™ 2.5.10 / 2.6.2.
  • This routine is available for Jira server and cloud deployment options.

Syntax

getCommentById(id);

Parameters

Parameter name

Type

Required

Description

issueKeyString

Yes for Jira cloud

The key of the issue, this parameter exists for the cloud deployment option only.

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:
(issueKey, commentId)

commentId

number

Yes

Id of the issue comment

Description

Gets all the comment properties for a given id.

Return type

JComment

The comment representation with the following keys:

Key name

Description

id

Id of the issue comment.

textComment text.
authorAuthor of the comment.
createdCreation date, as string, can be assigned to a date variable.
updatedByUpdater, or empty string if there is no updater.
updatedUpdated date, or empty string if there's no update.

Example

number [] arr = getAllCommentIds(argv["key"]);
for(number x in arr) {
 JComment cmt = getCommentById(x);
 runnerLog("Got comment:" + cmt["text"]);
}

See also


  • No labels