JEMH Cloud's templates filter out comments from notification depending on the recipients. The rules are:

You can change this behavior by creating custom templates. Please checkout this how to page if you don't know how to customize templates.

Velocity code of system templates is as following:

## Iterating over the latest comments the recipient can see...
#foreach( $comment in $jemhUtils.filterRestrictedComments($context.comments) )
   ## rendering the comment
   $jemhUtils.wikiToHtml($comment.body.textValue())
   ## tagging processing telling the notification system that a comment has been rendered ...
   $jemhUtils.setCommentRendered()
#end

By default, JEMH Cloud only notifies the latest 'just added' comments. 

To render all the comments, replace $context.comments with $context.issue.fields.comment.comments

## Iterating over all the comments the recipient can see...
#foreach( $comment in $jemhUtils.filterRestrictedComments($context.issue.fields.comment.comments))
   ## rendering the comment ...
   $jemhUtils.wikiToHtml($comment.body.textValue())
   ## tagging processing telling the notification system that a comment has been rendered ...
   $jemhUtils.setCommentRendered()
#end

And if you want to detect if a comment is JSD private, you can use $jemhUtils.isPrivateJSDComment($comment) method.

## Iterating over all the comments the recipient can see...
#foreach( $comment in $jemhUtils.filterRestrictedComments($context.issue.fields.comment.comments))
  #if ($jemhUtils.isPrivateJSDComment($comment))
  ## Private JSD Comment...
  #else
  ## Public JSD Comment...
  #end
  $jemhUtils.setCommentRendered()
#end

And finally, if you want to do your own security (not recommended)

## Iterating over all the comments (security warning!)
#foreach( $comment in $context.issue.fields.comment.comments)
  $jemhUtils.wikiToHtml($comment.body.textValue())
  $jemhUtils.setCommentRendered()
#end

 

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Related issues