Using the History List Macro
The HISTORY_LIST macro allows you to create a HTML table in e-mails that you send out from the Helpdesk containing the complete history of a workitem.
The following example, taken from the reference manual, shows how to create a simple table.
<TABLE>HISTORY_LIST[[<TD>$$workitem_version$$
</TD><TD>$$workitem_modified_on$$
</TD><TD>$$workitem_modified_by_worker_name$$</TD>]]</TABLE>
This table will contain the version number, the modification date and the name of the worker that modified the incident.
We can use the same format to output the comments:
<TABLE>HISTORY_LIST[[<TD>$$workitem_version$$</
TD><TD>$$workitem_modified_on$$</
TD><TD>$$workitem_comment$$</TD>]]</TABLE>
However, if this is used in an e-mail to the users, they will see all the comments added to the incident including ones which were set as not visible to guests. In order to remove these comments I came up with the following code:
<TABLE>
REGEX{{HISTORY_LIST[[<TR><TD TAG=$$workitem_comment_visible_to_guest$$>$$workitem_modified_on$$</TD></TR><TR><TD TAG=$$workitem_comment_visible_to_guest$$>$$workitem_comment$$</TD></TR>]]}}{{(<TR><TD TAG=0)(.*?)(</TR>)}}{{ }}
</TABLE>
Note: For the above to work the entire REGEX statement must be entered as a single line in the e-mail template.
- Login or register to post comments
- 2077 reads
- Printer-friendly version














Nice Work!
This tip will prove very useful for supporting some customers using handhelds as well for support. Thanks for posting it.
James "Scott" Hardie
Vice President of Technology Services
shardie@xcendgroup.com
http://www.xcendgroup.com
Just what I was looking for
We correspond alot through email from our Incidents and this will help in keeping the contact informed on what the email is about and what information we need from them.
Thank you.
Hi, Is there a way to make
Hi,
Is there a way to make the Date in BOLD, thought it might just seperate the different days better.
Otherwise very usefull edit!
Editing HTML
Hi,
How can I do this and where i need to make modifications.