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.
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
James "Scott" Hardie
Manager Systems Engineering
scott_hardie@symantec.com
http://www.symantec.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.
workitem_modified_by_worker_name not found
$$workitem_modified_by_worker_name$$ does not work in our e-mail template.
on the other hand $$workitem_modified_on$$ works,
so does $$workitem_status_lookup_value$$
so does $$workitem_modified_by_worker_ID$$
Can anyone help. I would like the e-mail history table to show the modified by worker name
modified worker name
the correct tag is $$modified_by_worker_name$$
My version of the same thing using his code:
<TABLE>
REGEX{{HISTORY_LIST[[<TR><TD TAG=$$workitem_comment_visible_to_guest$$>$$workitem_modified_on$$ $$modified_by_worker_name$$</TD></TR><TR><TD class="txtMsgValue" TAG=$$workitem_comment_visible_to_guest$$>$$workitem_comment$$</TD></TR>]]}}{{(<TR><TD TAG=0)(.*?)(</TR>)}}{{ }}
</TABLE>
(REGEX All on one line though)
Bolds the Comments themselves. Includes the worker name next to date.
Would you like to reply?
Login or Register to post your comment.