This page last changed on Mar 31, 2008 by edawson.

Customising FishEye email templates with Freemarker

This page lists the Freemarker data-model for FishEye email templates. See the Freemarker documentation for instructions on Freemarker syntax. Use the templates that ship with FishEye as a guide to the properties available on each object.

These templates are used to send both batch (e.g. daily) and immediate emails. The template has access to the changesets variable which contains the list of changesets to send.

The default FishEye email templates make use of various data model objects, listed below.

Here is a simple example that prints out each revision in each changeset.

[#list changesets as cs]
${cs.id} 
Author: ${cs.author}
Comment: ${cs.comment}
Files:
[#list cs.revisionInfos as rev]
  ${rev.path} ${rev.revision}
[/#list]
[/#list]

Primary Data Model Objects

Object name Function Notes
repname The name of the repository  
siteurl Base URL of the FishEye instance  
timezone The time zone as configured in admin  
watchpath The path for this watch  
changesets A list of changesets  

The syntax to use the data model object 'repname' as an example, is as follows:

${repname}

Changeset objects

The changesets list will contain multiple changesets for batch (e.g. daily) notifications and one element for immediate notifications.

These changeset objects have the following properties:

Object name Function Notes
comment The commit comment Belongs to a changeset
author Author of the commit Belongs to a changeset
dateValue the date of the commit Belongs to a changeset
revisionInfos A list of revisions for the changeset Belongs to a changeset

For example, to iterate through all the changesets notifications, you would use the following:

[#list changesets as cs]
  ${cs.id} ${cs.author}
[/#list]

Revision objects

Object name Function Notes
path The path of the file Belongs to a revisionInfo, under a changeset
revision The revision number Belongs to a revisionInfo, under a changeset
binary Boolean indicating whether file is binary Belongs to a revisionInfo, under a changeset
dead Boolean indicating whether file is deleted Belongs to a revisionInfo, under a changeset
move Boolean indicating whether file is moved Belongs to a revisionInfo, under a changeset
copy Boolean indicating whether file is copied Belongs to a revisionInfo, under a changeset
added Boolean indicating whether file is added Belongs to a revisionInfo, under a changeset
linesAdded Number of lines added Belongs to a revisionInfo, under a changeset
linesRemoved Number of lines removed Belongs to a revisionInfo, under a changeset
Document generated by Confluence on Apr 14, 2008 23:36