<Helpdesk>
<EmailTemplates>
  <EmailTemplate>
    <Guid>e41f36d4-16b7-47f5-b928-c779e4dd2abb</Guid>
    <Name>Send an E-mail Alert to a Helpdesk Administrator if an Incident Contains Large Comments</Name>
    <From>Altiris Helpdesk</From>
    <FromAddress>noreply@possible.nrp</FromAddress>
    <Type>0</Type>
    <Description>This e-mail template is used by the related notify rule "Alert a Helpdesk Administrator if an Incident Contains Large Comments" to send an e-mail alert to a Helpdesk Administrator for manual processing if an incident contains large comments. For more information, refer to the following Symantec Knowledge Base article:

Incidents with large comments cause slow performance, timeouts or out of memory errors in Helpdesk
http://www.symantec.com/business/support/index?page=content&amp;id=TECH145515</Description>
    <Subject>RE: Incident #WORKITEM(workitem_number) - Alert: This incident contains comments that have too many characters.</Subject>
    <Body>&lt;html&gt;

&lt;head&gt;
&lt;title&gt;Altiris Incident Received&lt;/title&gt;
&lt;style&gt;
	body
	{
		margin:0px;
		padding: 0px;
		font-size: x-small;
		font-family: verdana;
		color:dimgray;
		background: #F7FBFF;
	}
	a
	{
		color: blue;
		text-decoration: underline;
	}
	div.banner
	{
		background-color: #7396B5;
		padding:6px;
	}
	div.body
	{
		padding:6px;
	}
	table.banner
	{
		border:#7396B5 0px solid;
		color: #000063;
	}
	table
	{
		font-size:x-small;
	}
	.txtSubTitle
	{
		font-weight: bold;
		font-size: x-small;
		color: #42698c;
		font-family: Verdana;
	}
	/*E-mail Critical*/
	.emailCriticalTitle
	{
		color:white;
		font-weight:normal;
		font-size:x-small;
		background-color:#DE0000;
		padding:6px;
	}
	.emailCriticalText
	{
		color:#DE0000;
		padding:6px;
		margin-bottom:4px;
		font-size:x-small;
		background-color: #fff2f2;
		border: #DE0000 1px solid;
	}


	/*E-mail High*/
	.emailHighTitle
	{
		color:black;
		font-weight:normal;
		font-size:x-small;
		background-color:#FF9A00;
		padding:6px;
	}
	.emailHighText
	{
		color:black;
		padding:6px;
		margin-bottom:4px;
		font-size:x-small;
		background-color: #FFEFD6;
		border: #FF9A00 1px solid;
	}


	/*E-mail Medium/Warning*/
	.emailMedWarnTitle
	{
		color:black;
		font-weight:normal;
		font-size:x-small;
		background-color:#FFE34A;
		padding:6px;
	}
	.emailMedWarnText
	{
		color:black;
		padding:6px;
		margin-bottom:4px;
		font-size:x-small;
		background-color: #FFF3CE;
		border: #FFE34A 1px solid;
	}


	/*E-mail Normal*/
	.emailNormalTitle
	{
		color:#f5fff5;
		font-weight:normal;
		font-size:x-small;
		background-color:green;
		padding:6px;
		padding-right:6px;
	}
	.emailNormalText
	{
		color:black;
		padding:6px;
		margin-bottom:4px;
		font-size:x-small;
		background-color: #eefff5;
		border: green 1px solid;
	}

	/*E-mail Low*/
	.emailLowTitle
	{
		color:#63655A;
		font-weight:normal;
		font-size:x-small;
		background-color:#CECBBD;
		padding:6px;
		padding-right:6px;
	}
	.emailLowText
	{
		color:#63655A;
		padding:6px;
		margin-bottom:4px;
		font-size:x-small;
		background-color: #EFEBDE;
		border: #CECBBD 1px solid;
	}

	/*Text settings for email messages*/
	.txtMsgValue
	{
		color:black;
		font-weight:bold;
		width:100%;
	}
	.txtMsgCritical
	{
		color:#DE0000;
		font-weight:bold;
		width:100%;
	}
	.txtMsgHigh
	{
		color:#FF9A00;
		font-weight:bold;
		width:100%;
	}
	.txtMsgMedWarn
	{
		color:goldenrod;
		font-weight:bold;
		width:100%;
	}
	.txtMsgNormal
	{
		color:green;
		font-weight:bold;
		width:100%;
	}
	.txtMsgInfo
	{
		color:#63655A;
		font-weight:bold;
		width:100%;
	}
	.txtMsgLabel
	{
		color:dimgray;
		padding-left:20px;
		padding-right:5px;
		white-space:nowrap;
	}
	.txtMsgComment
	{
		color:dimgray;
		padding-left:20px;
		padding-right:5px;
	}
	hr
	{
		width: 100%;
		color: gainsboro;
		height: 1px;
	}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;basefont face="Verdana,Arial,Geneva,Sans-Serif" size="2" /&gt;

&lt;!-- Header =========================================== --&gt;

&lt;div class="banner"&gt;
	&lt;table cellpadding="0" cellspacing="0" class="banner"&gt;
		&lt;tr valign="top"&gt;
			&lt;td nowrap style="padding-left:10px;"&gt;
				&lt;span style="font-size:xx-small;font-weight:normal;color:#F7FBFF;"&gt;&lt;big&gt;altiris&lt;/big&gt;&lt;br&gt;&lt;/span&gt;
				&lt;span style="font-weight: bold;font-size: 16pt;color:#000063;"&gt;Incident Received&lt;/span&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
&lt;/div&gt;

&lt;div class="body"&gt;

&lt;!-- Message =========================================== --&gt;

&lt;table&gt;
	&lt;tr&gt;
		&lt;td class="txtMsgValue" colspan="2"&gt;
			We have received your Helpdesk request:
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td colspan="2"&gt;&lt;small&gt;&amp;nbsp;&lt;/small&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td colspan="2" class="txtSubTitle"&gt;
			Details
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td class="txtMsgLabel"&gt;Incident&amp;nbsp;#:&amp;nbsp;&lt;/td&gt;
		&lt;td class="txtMsgValue"&gt;WORKITEM(workitem_number)&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td class="txtMsgLabel"&gt;Title:&amp;nbsp;&lt;/td&gt;
		&lt;td class="txtMsgValue"&gt;WORKITEM(workitem_title)&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td colspan="2" class="txtSubTitle"&gt;
			Comment
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td colspan="2" style="padding-left:20px;" class="txtMsgValue"&gt;
			WORKITEM(workitem_comment)
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;

&lt;hr /&gt;

Warning: This incident contains comments that exceed 4,000 characters. This incident's comments will require manual truncating to prevent performance issues from occurring in Helpdesk.

&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</Body>
    <InterpretAsHTML>yes</InterpretAsHTML>
    <Status>active</Status>
  </EmailTemplate>
</EmailTemplates>
<NotifyRules>
  <NotifyRule>
    <Guid>0d90bfed-0308-4166-a74f-6f885cc824bb</Guid>
    <Name>Alert a Helpdesk Administrator if an Incident Contains Large Comments</Name>
    <Description>This rule will send an e-mail alert to a Helpdesk Administrator if an incident contains large comments. This rule is disabled by default. If this rule is to be used, set this rule to Default and Active and then set who the recipients will be for the e-mail notification. Next, disable the related validation and incident rules "Prevent Saving an Incident if it Contains Large Comments" and "Truncate Large Comments in E-mail Sent as Helpdesk Incidents". Finally, enable the related e-mail template "Send an E-mail Alert to a Helpdesk Administrator if an Incident Contains Large Comments". The Helpdesk Administrator is then responsible for correcting the issue manually. For more information, refer to the following Symantec Knowledge Base article:

Incidents with large comments cause slow performance, timeouts or out of memory errors in Helpdesk
http://www.symantec.com/business/support/index?page=content&amp;id=TECH145515</Description>
    <EmailTemplateGuid>e41f36d4-16b7-47f5-b928-c779e4dd2abb</EmailTemplateGuid>
    <ToCurrentContact>no</ToCurrentContact>
    <CcCurrentContact>no</CcCurrentContact>
    <BccCurrentContact>no</BccCurrentContact>
    <ToSpecificWorkerIdList />
    <CcSpecificWorkerIdList />
    <BccSpecificWorkerIdList />
    <ToOtherAddressList />
    <CcOtherAddressList />
    <BccOtherAddressList />
    <Status>inactive</Status>
    <IsDefault>no</IsDefault>
    <IsVisibleToWorkers>no</IsVisibleToWorkers>
    <IsLockedForWorkers>no</IsLockedForWorkers>
    <FilterOutModifiedBy>no</FilterOutModifiedBy>
    <ApplyTo>all</ApplyTo>
    <CurrentContactOtherAddressList>no</CurrentContactOtherAddressList>
    <Criteria>
      <Criterion field="workitem_comment" op="optMatches" value="^([\s\S]){3956,}([\s\.])" type="text" />
    </Criteria>
  </NotifyRule>
</NotifyRules>
<IncidentRules>
  <IncidentRule>
    <Guid>fe8c1c4d-3b81-4511-aa54-bf79f26241ed</Guid>
    <Name>Truncate Large Comments in E-mail Sent as Helpdesk Incidents</Name>
    <Description>This rule will truncate e-mail comments larger than 4,000 characters. For more information, refer to the following Symantec Knowledge Base article:

Incidents with large comments cause slow performance, timeouts or out of memory errors in Helpdesk
http://www.symantec.com/business/support/index?page=content&amp;id=TECH145515</Description>
    <Status>active</Status>
    <Rank>0</Rank>
    <IsTerminal>yes</IsTerminal>
    <ApplyTo>all</ApplyTo>
    <IncidentEdits>
      <SetValue field="workitem_comment" value="HDQUERY[[SELECT 'Note: E-mail comments were truncated due to excessive length.' +char(13) + char(10) + char(10) + SUBSTRING(comment,1,3956) FROM workitem with (NOLOCK) WHERE number = WORKITEM(workitem_number) AND is_last=1]]" />
    </IncidentEdits>
    <Criteria>
      <Criterion field="workitem_comment" op="optMatches" value="^([\s\S]){3956,}([\s\.])" type="text" />
    </Criteria>
  </IncidentRule>
</IncidentRules>
<ValidationRules>
  <ValidationRule>
    <Guid>8c3da31f-b271-4ab4-8c4a-3f92256211fa</Guid>
    <Name>Prevent Saving an Incident if it Contains Large Comments</Name>
    <Description>This rule will block saving a new incident if comments are larger than 4,000 characters. For more information, refer to the following Symantec Knowledge Base article:

Incidents with large comments cause slow performance, timeouts or out of memory errors in Helpdesk
http://www.symantec.com/business/support/index?page=content&amp;id=TECH145515</Description>
    <Status>active</Status>
    <Message>The comment that you are attempting to save has too many characters. Please reduce this below 4,000 characters or consider saving the whole comment as a file attachment instead.</Message>
    <LogToNs>yes</LogToNs>
    <Rank>0</Rank>
    <ApplyTo>all</ApplyTo>
    <Criteria>
      <Criterion field="workitem_modified_by_worker_id" op="optNotEqual" value="5" type="uint" />
      <Criterion field="workitem_comment" op="optMatches" value="^([\s\S]){3956,}([\s\.])" type="text" />
    </Criteria>
  </ValidationRule>
</ValidationRules>
</Helpdesk>