Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Email template not working

Hi Community,

Find below a script on email template that is supposed to display the content of external comments in the email template.

Unfortunately, it is not working as expected while giving errors.

Is there something wrong with the script?

def comments = com.atlassian.jira.component.ComponentAccessor.commentManager.getComments(issue)?.collect {
def isInternal = { com.atlassian.jira.issue.comments.Comment c ->
def commentProperty =,, SD_PUBLIC_COMMENT).getEntityProperty().getOrNull()
if (commentProperty)

{ def props = groovy.json.JsonSlurper.parseText(commentProperty.getValue()) props['internal'].toBoolean() }


{ null }


if (isInternal(it) == false){ //If internal comment = false (it is external comment)
"External Comments >> ${it.body} <br>"

{ //If it is internal comment "" }



Thank you in advance for you support.

Best regards,
Jason Li

0 answers

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you