Groovy templates template is a templating engine for JavaScript. It lets you insert dynamic content in any text through the use of templates. A template contains variables and/or expressions, which get replaced with values when a template is rendered. This is very similar to JSP markup.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<% issue.getKey() %> |
You could also use $Groovy $some Groovy code
, but only for a variable and not when a method is called on a variable. For example:
...
To send an Email to the Voters and Watchers of the issue when the issue is resolved, write this is as the Subject of the Email
Code Block | ||||
---|---|---|---|---|
| ||||
Hi All, <% if (issue.assignee) {%> The issue <%= issue.key%> has been resolved by <%=issue.assignee%> <%} else {%> The issue <%= issue.key%> has been resolved <%}%> Regards, <%=issue.get("project")?.getLead()?.getDisplayName()%> |
Note Note that you can also "print" to the text: If you would like to print all the components of the project
...