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

getCommentById(id)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Gets all the comment properties for a given id.

Gets all the comment properties for a given id.

Parameters

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

Parameter name

Type

Required

Description

comment ID

...

Number

...

Yes

Id of the page comment

Return

...

Type

CComment

The comment representation with the following keys:

...

Key name

...

Description

...

id

...

Id of the page comment.

...

Example 1

...

Example

Deletes all comments older than 1 year from page ID 11801.

Code Block
languagejs
number [] allComm = getAllCommentIds(11801);
interval year = "365d";

for(number c in allComm) {
	CComment comm = getCommentById(c);
	if(comm.created < (currentDate - year)) {
		deleteComment(c)
	}
}

Deletes all comments older than 1 year from page ID 11801.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "pscomment_conf"routines" and space = currentSpace ( )
labelsjiraarray_comment_routineroutines