Crucible Latest (3.2) : Customising email notifications

Email notifications in Crucible can be customised to change their formatting, by editing template files. This page contains instructions for this process.

Editing Crucible email templates

Template files for Crucible are stored in the <Crucible home directory>/template/crucible/ folder.

There are sets of templates for both HTML and plain-text emails, as listed in the table below. Note that these templates do not support embedding full diffs into notifications. They are only for changing the appearance and order of certain content inside the messages.

You can edit templates in any text editor:

  • Either: Stop Crucible before editing templates to avoid disrupting notifications that may otherwise be sent.
  • Or: Avoid editing a live template file, as Crucible may try to use it while you are editing. This could have unpredictable results. Instead, back up the template file (it's wise to keep original versions of all these files), edit a copy you have made, then overwrite the 'live' template once you have finished.
  • After an edit, the change to the email template will take place immediately. No restart is required.

Advanced editing of Crucible email templates

The email notification templates use the Freemarker format. Freemarker is a general templating engine enabling automated content.

If you are familiar with Freemarker, more advanced customisations can be made to the email notification templates. However, you make such adjustments at your own risk.

See Freemarker Data Model for Email Templates in the FishEye documentation for details of the data model used by FishEye/Crucible.

Crucible email template files

The following template files for Crucible notification are stored in the <Crucible home directory>/template/crucible/ folder.
 

Template filename

Purpose

crucible-notification-subject.ftl

Subject template.

All of the content must be contained within the first line of the template.

You can't use markup in this line.

crucible-notification-header.ftl

Header template

crucible-notification-footer.ftl

Footer template

state-closed-notification.ftl

State Closed template

all-completed-notification.ftl

All Completed template

state-changed-notification.ftl

State Changed template

completed-notification.ftl

Completed template

general-notification.ftl

General notification template

uncompleted-notification.ftl

'Uncompleted' template

all-no-longer-completed-notification.ftl

All-No-Longer-Completed template

comment-notification.ftl

Comment template

reply-notification.ftl

Reply template

review-precis-plain.ftl

Precis template

review-reminder-notification.ftlReview Reminder template

See also Customising FishEye Email Notifications.

Comments:

There's a Bug report currently opened tracking the fact that email subject customization does not work:  CRUC-4180 - Email Subject template does not allow for modification ( Open)

Posted by mmangier at Dec 10, 2012 08:50

In fact a lot of information from this page needs to be updated. This is tracked as  CRUC-6297 - Update the Customising email notifications page ( Open)

Posted by mmangier at Dec 10, 2012 10:22