Versions Compared

Key

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

...

Abstract

This code snippet fetches the comment added during a transition

Logic

Access the text of the comment using transientVars variable.

Snippet 

Code Block
languagejs
linenumberstrue
transientVars.comment

Placeholders

NA

Examples

The output of this snippet is a String which you can use in:in A Groovy expression, for example to :

  • Set a text field with the comment that was just created. Eg: Set a custom text field to the comment that was just added in one of the Set field value post-functions

A Groovy template, for example to:

...

Subject/HTML body/Text body of Email issue post-function

Code Block
languagejs
linenumberstrue
<% if(transientVars.comment) {%>
A comment: <%=transientVars.comment %> has been added on the linked issue  
<% } else {%>
No comment was added on the linked issue
<% } %>

display the comment in a Calculated Text custom field.

References

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "jmwe-groovy" and type = "page" and space = "KB"
labelsjmwe-nunjucks jmwe-cloud

...