Adding Velocity Templates to Bug Tracker Plugins
Fortify Software Security Center provides pre-defined templates for the summary and description fields of the supported bug tracker plugins that ship with Fortify Software Security Center. You can edit these templates or add templates that map other text-based fields that the plugin provides.
Important! Before you add a new template or edit an existing one, make sure 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, Fortify 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:
-
On the OpenText header, select Administration.
-
In the left pane, select Templates, and then select Bug Filing Templates.
The Bug Filing page lists the template groups for supported bug trackers.
-
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.
-
Click EDIT.
-
Click + ADD FIELD.
-
In the Mapped field box in the ADD TEMPLATE dialog 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.)
-
In the Template box, type your Velocity Template Language (VTL) statement for the mapping.
For information about format 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.)
Note: Not all variables are available for all issues. In particular, verbose content such as “ATTRIBUTE_COMMENTS,” “ISSUE_DETAIL,” and “ISSUE_RECOMMENDATION” is available only if you are filing a bug for a single issue.
-
Click APPLY.
-
To add another template, repeat steps 5 through 8.
-
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