<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-AU link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Rt-users,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I was wondering if you could help me – I am trying to
develop a Scrip custom condition that will prevent notification if a
“Owner: <owner>” field has been emailed in ticket creation.
We are using RT to generate tickets via email and in some cases we assign the
owner on submission – the entire team that is ‘watching’ the
queue does not need to receive email about tickets that already have an owner.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>OnCreateNotifyAdminCc<o:p></o:p></p>
<p class=MsoNormal>Condition: OnCreate<o:p></o:p></p>
<p class=MsoNormal>Action: Notify AdminCcs<o:p></o:p></p>
<p class=MsoNormal>Template: Global template: Transaction<o:p></o:p></p>
<p class=MsoNormal>Stage: TransactionCreate<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Custom condition:<o:p></o:p></p>
<p class=MsoNormal>my $transactionType = $self->TransactionObj->Type;<o:p></o:p></p>
<p class=MsoNormal>my $ticketOwner = $self->TicketObj->Owner;<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>if ($transactionType eq 'Create') {<o:p></o:p></p>
<p class=MsoNormal> return 1 if ($ticketOwner()->Id() !=
$RT::Nobody()->Id()); <o:p></o:p></p>
<p class=MsoNormal>}<o:p></o:p></p>
<p class=MsoNormal>return 0;<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Ultimately we only want to continue executing the script if
the owner is NOT Nobody.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Regards Mathew<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Mathew Ericson<o:p></o:p></p>
<p class=MsoNormal>IT Specialist (Systems Design)<o:p></o:p></p>
<p class=MsoNormal>Agilent Technologies, Inc.<o:p></o:p></p>
<p class=MsoNormal>+613 9210-5956 Tel<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>