Using Velocity to set custom fields

Using Velocity to set custom fields

When using a Velocity value type for a custom field default, the rendered output of the Velocity template is set as the value for the custom field. See more Velocity examples.

Unfamiliar with Velocity templates? For more information about using them, see the https://velocity.apache.org/engine/1.7/user-guide.html#what-is-velocity.

Velocity Context

When you create a dynamic Custom Field Default, you can make use of special variables found in the ‘context’, see them through:

  • Profile > Project Mapping > Issue > Edit

Steps to set create a Velocity Custom Field Default

Default custom field values are set in Project Mapping and resolved when an email is processed.

  1. Go to Profile > Project Mapping > Issue > Edit

  2. Under CUSTOM FIELDS DEFAULTS you will see the available custom fields for the project mapping's project.

  3. Find your custom field, select Velocity and when you want the field to be updated e.g. On Create/Comment.

  4. Enter the relevant script within the text-box

See the following page for some example Velocity Scripts: Velocity Script Examples