deleteComment

Description

Deletes a comment with the specified id, deletes the latest comment or deletes all comments from a given issue.

Parameters

Return Type

Number

The number of comments deleted.

Examples

Example 1

return deleteComment("DELETE_ALL", "TEST-1");

Deletes all comments from "TEST-1" and returns the number of comments deleted.

Example 2

return deleteComment("DELETE_ALL", "TEST-1", false);

Deletes all comments from "TEST-1" and returns the number of comments deleted. The issue comment deleted event will not be triggered.

Example 3

return deleteComment("DELETE_LATEST", "TEST-2");

Deletes the latest comment from "TEST-2" and returns "1" because only one comment was deleted. If the comment cannot be deleted it will return "0".

Example 4

Deletes the comment with id 12400 and returns "1" because only one comment was deleted. If the comment cannot be deleted it will return "0".

Example 5

Deletes the comment with id 12400 and returns "1" because only one comment was deleted. If the comment cannot be deleted it will return "0". The issue comment deleted event will not be triggered.

See also