Converting legacy rendering
This page is only relevant to you if you upgraded from the old 'Jira Automation' add-on by Atlassian Labs to 'Automation for Jira' by Code Barrel. If you are a new user and never upgraded, then this documentation does not apply and you can kick back and relax.
For more details on the different versions please see our comparison lite vs pro.
The old 'Jira Automation' add-on used Velocity to render issue values when using the 'Comment action' or 'Edit issue' action in an automation rule. For example, you could write a comment as:
The issue $issue.key was just updated.
and this would get rendered as
The issue TEST-1234 was just updated.
The 'Automation for Jira' add-on uses Mustache to render issue values. Mustache was chosen mainly for simplicity and security. Velocity allows far more access to Jira internals but could lead to insecure code execution.
However, to make the upgrade as simple as possible legacy Velocity rendering was introduced into 'Automation for Jira' so that your existing rules continue to work after the upgrade. The only restriction, for security reasons, is those rules cannot be converted to project specific rules, and Velocity rendering doesn't work for imported rules in Cloud (requires converting imported rules to use smart values). There's also less features available (you should try to upgrade them to Mustache as soon as possible).
Converting legacy values
Only 'Comment' and 'Edit issue' actions use this rendering mechanism (for 'Edit issue' only if 'Allow variable expansion' is checked). When upgrading to the new Automation for Jira, components using legacy rendering are detected and after the upgrade, these components show the following warning:
This comment is rendered using Velocity. Clicking 'Enable smart value rendering' switches this comment action to Mustache rendering. This operation cannot be undone!
The Velocity renderer provides the following context objects:
How to convert:
|Old Velocity value||Mustache expression|
See our smart value documentation for more detailed examples!
In our comment example shown in the screenshot above:
- You'd simply convert 'Hello
$issue.key' to 'Hello
- Then hit the 'Enable smart value rendering' button
That's it. This is how the comment action would look like:
Once you've upgraded, you can't create new actions that use Velocity any longer. Velocity is dead - Mustache and smart values are the way of the future.