This section describes how to modify e-mail template (User Management->E-Mail Templates->Edit).
E-mail templates contain the text which includes the information on the task and the elements of formatting this data. E-mail templates can be used for the e-mail notification messages formatting as well as for the filter subscription messages formatting.
To generate the text according to the template TrackStudio use the FreeMarker template engine -- a generic tool to generate text output based on templates. Please refer the FreeMarker manual for more information. You can use standard TrackStudio’s templates as a basis to create your own as well as to create new templates.
To change the current text of the template, insert the new text to the text area on the User Management->E-Mail Templates->Edit tab and click the Save button. If the text of the template is correct, the new template will be saved.
You can use the following macros commands in e-mail templates:
Name |
Type |
Description |
Sample |
addval.path_html |
String |
Full path (HTML format) |
<@headerline2 name=titles.PATH value=addval.path_html/> |
addval.path_text |
String |
Full path (text format) |
<@headerline name=titles.PATH value=addval.path_text/> |
addval.filterInfo |
String |
Filter information |
<@itext text=addval.filterInfo?html/> |
addval.df.parse (date) |
N/A |
Format date |
<@td value=addval.df.parse (item.getDeadline())/> |
addval.hf.format (hours, format) |
N/A |
Format time (hh:mm), using titles.FORMAT as format |
<@td2 value=addval.hf.format (msg.getBudget().floatValue(), titles.FORMAT)/> |
addval.bw.decodeString (string) |
N/A |
Decode HTML string to the plain text string |
<#macro decode str> ${addval.bw.decodeString(str)} </#macro> |
addval.Form |
String |
Form-based e-mail submission form |
${addval.Form} |
addval.tasklink |
String |
Task URL |
${addval.tasklink} |
Udfs |
List of HashMaps{("caption", udfCaption), ("value", udfValue)} |
List of custom fields with values |
<#list udfs as y> <@headerline name=y.caption value=y.value/> </#list> |
Items |
List of Tasks |
List of subtasks |
<#list items as i> <@subline item=i/> </#list> |
msglist |
List of Messages |
List of messages |
<#list msglist as m> <@message msg=m/> </#list> |
Task |
Task |
Current task |
<@header title=task.getName()> |
subudf |
HashMap(subtaskId, values) |
List of custom fields for subtasks |
<#if (subudf[item.getId()]?exists)> <#list subudf[item.getId()] as y> <@td value=y/> </#list> </#if> |
sublink |
HashMap(subtaskId, path) |
Full path (HTML) |
<@td value=sublink[item.getId()]/> |
sublinktext |
HashMap(subtaskId, path) |
Full path (plain text) |
<@headerline name=titles.subtask.NAME value=sublinktext[item.getId()]/> |
Header strings
Name |
Type |
titles.TASKNUMBER |
String |
titles.PATH |
String |
titles.ALIAS |
String |
titles.BUDGET |
String |
titles.ABUDGET |
String |
titles.SUBMITDATE |
String |
titles.UPDATEDATE |
String |
titles.CLOSEDATE |
String |
titles.DEADLINE |
String |
titles.PRIORITY |
String |
titles.CATEGORY |
String |
titles.STATUS |
String |
titles.RESOLUTION |
String |
titles.SUBMITTER |
String |
titles.HANDLER |
String |
titles.DESCRIPTION |
String |
titles.FORMAT |
String |
titles.subtask.TASKNUMBER |
String |
titles.subtask.CATEGORY |
String |
titles.subtask.STATUS |
String |
titles.subtask.RESOLUTION |
String |
titles.subtask.SUBMITTER |
String |
titles.subtask.SUBMITTERSTATUS |
String |
titles.subtask.HANDLER |
String |
titles.subtask.HANDLERSTATUS |
String |
titles.subtask.DEADLINE |
String |
titles.subtask.SUBMITDATE |
String |
titles.subtask.UPDATEDATE |
String |
titles.subtask.CLOSEDATE |
String |
titles.subtask.BUDGET |
String |
titles.subtask.ABUDGET |
String |
titles.subtask.SUBTASKS |
String |
titles.subtask.MESSAGES |
String |
titles.subtask.PRIORITY |
String |
titles.subtask.NAME |
String |
titles.subtask.udfCaption |
List of custom field names |
titles.messages.INFO |
String |
titles.messages.DESCRIPTION |
String |
titles.messages.MESSAGETYPE |
String |
titles.messages.HANDLER |
String |
titles.messages.RESOLUTION |
String |
titles.messages.PRIORITY |
String |
titles.messages.DEADLINE |
String |
titles.messages.BUDGET |
String |
titles.messages.HOURS |
String |
titles.messages.MESSAGES |
String |
Filter settings
Name |
Type |
filter.TASKNUMBER |
Boolean |
filter.CATEGORY |
Boolean |
filter.STATUS |
Boolean |
filter.RESOLUTION |
Boolean |
filter.SUBMITTER |
Boolean |
filter.SUBMITTERSTATUS |
Boolean |
filter.HANLDER |
Boolean |
filter.HANDLERSTATUS |
Boolean |
filter.DEADLINE |
Boolean |
filter.SUBMITDATE |
Boolean |
filter.UPDATEDATE |
Boolean |
filter.CLOSEDATE |
Boolean |
filter.BUDGET |
Boolean |
filter.ABUDGET |
Boolean |
filter.CHILDCOUNT |
Boolean |
filter.MESSAGECOUNT |
Boolean |
filter.PRIORITY |
Boolean |
filter.DESCRIPTION |
Boolean |
filter.MESSAGEVIEW |
Boolean |
Task properties
Name |
Type |
Description |
task.getName() |
String |
Task name |
task.getTaskNumber() |
String |
Task number |
task.getShortname() |
String |
Task alias |
task.getBudgetFmt(titles.FORMAT) |
String |
Task budget |
task.getActualBudgetFmt("text") |
String |
Task actual budget |
task.getSubmitdate() |
Date |
Task submit date |
task.getLastUpdateDate() |
Date |
Task update date |
task.getCloseDate() |
Date |
Task closed date |
task.getDeadline() |
Date |
Task deadline |
task.getPriority().getName() |
String |
Task priority name |
task.getCategory().getName() |
String |
Task category name |
task.getStatus().getName() |
String |
Task status name |
task.getResolution().getName() |
String |
Task resolution name |
task.getSubmitter().getHtmlName() |
String |
Task submitter name (in HTML format) |
task.getHandler().getTextName() |
String |
Task handler name (in text format) |
task.getDescription() |
String |
Task description |
task.getWikiParsedDescription() |
String |
Task description parsed by text formatting engine |
Message properties
Name |
Type |
Description |
message.getTime() |
Date |
Message submit date |
message.getPruser().getUser().getHtmlName() |
String |
Message submitter (in HTML format) |
message.getMstatus().getName() |
String |
Message type |
message.getHandler().getHtmlName() |
String |
Message handler (in HTML format) |
message.getResolution().getName() |
String |
Message resolution |
message.getPriority().getName() |
String |
Message priority |
message.getDeadline() |
Date |
Message deadline |
message.getBudget() |
Float |
Message budget |
message.getHrs() |
Float |
Message hours (actual budget) |
message.getWikiParsedDescription() |
String |
Task description parsed by text formatting engine |