Bogey,<br><br>Sure. Keep in mind that if this is something you want to happen in ALL Queues, Then you don't need thisw scrip. RT offers this as a Global option. Anyway, here is the one for On Create from emails:<br><br>
#Custom Action cleanup Code:<br># Set up variables for parsing CC's<br><br>my $trans = $self->TransactionObj;<br>my $ticket = $self->TicketObj;<br>my $user = RT::User->new($RT::SystemUser);<br>my $addr;<br>my $header;<br>
my $ccname;<br>my $cc;<br><br># Parse the email CC's into ticket "CC" Watchers<br><br>foreach $header ($trans->Attachments->First->GetHeader("Cc"))<br> {<br> foreach $cc ( split /\,/, $header )<br>
{ <br> ($addr) = $cc =~ /([\w-]+?\@[\w-]+?\.[\w]+)/;<br> $ccname = substr($addr, 0,length($addr)-8);<br> $addr = $user->CanonicalizeEmailAddress($ccname);<br> $ticket->AddWatcher( Type => 'Cc', Email => $ccname );<br>
} <br> }<br><br>return 1;<br><br>For the "On Correspondence one, you merely add an "unless" after the $addr code:<br><br> unless ($ticket->IsWatcher(Type => 'Cc', EmailAddress => $addr))<br>
{<br> $ticket->AddWatcher( Type => 'Cc', Email => $ccname );<br> }<br><br>So anyway, you can put this code into any Queue you want this to happen in, but again, if you want all Queue to have this, then its better to turn on that option in you config settings.<br>
<br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Sun, May 2, 2010 at 9:34 AM, HS <span dir="ltr"><<a href="mailto:bogey_63@yahoo.com">bogey_63@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">Hi Ken,<br>could you provide this scrip, please? Would like to give it a try.<br><br>Thanks!<br><br>best<br><br>--- Kenneth Crocker <i><<a href="mailto:kfcrocker@lbl.gov" target="_blank">kfcrocker@lbl.gov</a>></i> schrieb am <b>Fr, 30.4.2010:<br>
</b><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><b><br>Von: Kenneth Crocker <<a href="mailto:kfcrocker@lbl.gov" target="_blank">kfcrocker@lbl.gov</a>><br>Betreff: Re: [rt-users] merge users(?)<br>
An: "who else" <<a href="mailto:bogey_63@yahoo.com" target="_blank">bogey_63@yahoo.com</a>><br>CC: <a href="mailto:rt-users@lists.bestpractical.com" target="_blank">rt-users@lists.bestpractical.com</a><br>
Datum: Freitag, 30. April, 2010 18:34 Uhr<br><br></b><div><div></div><div class="h5"><div><b>Bogey,<br><br>Did you consider just making the extra Users Cc's on the Ticket? Then all you would have to do is make sure there was a notification scrip for Cc's on whatever. We have a scrip that will "Add a Ticket CC" for all Cc's on an email when a ticket is <i>created</i> <b>or</b> <i>on correspondence.</i>
That way, you don't have to have a CF and monitor/maintain it. I think it simpler.<br>
<br>Kenn<br>LBNL<br><br></b><div class="gmail_quote"><b>On Fri, Apr 30, 2010 at 9:27 AM, who else <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=bogey_63@yahoo.com" target="_blank">bogey_63@yahoo.com</a>></span> wrote:<br>
</b><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<b><br>
Someone, please?<br>
<br>
TIA<br>
<br>
w_e<br>
</b><div><b><br>
who else wrote:<br>
><br>
> Well,<br>
> it seems it works.<br>
><br>
> BUT:<br>
><br>
> I worked it out this way:<br>
><br>
>>There is a scrip that can do this:<br>
><br>
>><a rel="nofollow" href="http://wiki.bestpractical.com/view/AddRequestor" target="_blank">http://wiki.bestpractical.com/view/AddRequestor</a><br>
><br>
>>You create a custom user field called othermail and populate it with the<br>
>>people you want to get the email. All, the other IBMers will be added as<br>
>>requestors whenever one of them requests. We've done this for some<br>
>>supervisors who want to keep an eye on all calls made by their staff.<br>
><br>
> Unfortunately this only works for ONE additional othermail but not two. It<br>
> only accepts the first emailadress. Anybody out here, to point me in the<br>
> right direction please, am not a programmer, so i'd appreciate your help.<br>
><br>
> Thank you very much.<br>
><br>
> w_e<br>
><br>
> PS: Besides this it works like a charm ;-)<br>
><br>
<br>
--<br>
</b></div><b>View this message in context: <a rel="nofollow" href="http://old.nabble.com/merge-users%28-%29-tp28151060p28414178.html" target="_blank">http://old.nabble.com/merge-users%28-%29-tp28151060p28414178.html</a><br>
</b><div><div></div><div><b>Sent from the Request Tracker - User mailing list archive at Nabble.com.<br>
<br>
<br>
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
Buy a copy at <a rel="nofollow" href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
</b></div></div></blockquote></div><b><br>
</b></div></div></div></blockquote></td></tr></tbody></table><br></blockquote></div><br>