Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


SyntaxSyntax

getAllCommentIds(pageId)

Description

Excerpt

Gets all the comment ids IDs that are already entered on an a page.

Parameters

Parameter name

Type

Required

Description

page ID

numberyesID of the selected page.

Return type

number []

IDs of the comments on the page.

Example

Example 1

Code Block
number [] allComm = getAllCommentIds(11801);

print("Page has " + size(allComm) + " comments";

Print Page has 12 comments for example.

Example 2

Code Block
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
showSpacefalse
cqllabel = "ps_conf"
labelsjira_comment_routine