Adding Velocity Templates to Bug Tracker Plugins

Application Security provides pre-defined templates for the summary and description fields of the supported bug tracker plugins that ship with Application Security. You can edit these templates or add templates that map other text-based fields that the plugin provides.

Before you add a new template or edit an existing one, ensure that you review the pre-defined templates carefully to understand how to correctly reference variables within the template.

As you create (or edit) a template, keep the following in mind:

  • To avoid runtime errors, OpenText strongly recommends that you validate variables in your template before you render them. (See the pre-defined templates for examples of how to use a macro.)
  • Use conditionals if you want to render content differently for a single-issue bug (as opposed to a bug that includes multiple issues).

To add a Velocity template to a bug tracker plugin:

  1. On the header, select Administration.

  2. On the navigation pane, expand Templates, and then select Bug Filing Templates.

    The Bug Filing page lists the template groups for supported bug trackers.

  3. In the table, click the row that shows the template group for your bug tracker plugin.

    The row expands to display details for the pre-defined templates mapped to the description and summary fields for the plugin.

  4. Click EDIT.

  5. Click + ADD FIELD.

  6. In the Mapped Field box, type the name of the field to map, as it appears in the bug tracker plugin dialog box.

    Note that you can map only text-based fields.

  7. In the Template box, type your Velocity Template Language (VTL) statement for the mapping.

    For information about formatting the VTL statement, click the Editing tips link. To access full instructions on how to write the statement, click the Velocity User Guide link. This takes you to the Apache Velocity Project website. To see a list of all available variables, click SHOW VARIABLES.

  8. Click APPLY.

  9. To add another template, repeat steps 5 through 8.

  10. Click SAVE.

On the Bug Filing page, the details for the bug tracking plugin now include your new template.

See Also

Velocity templates for bug filing

Customizing Velocity Templates for Bug Tracker Plugins

Bug tracker configuration

Deleting Velocity Templates