<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That worked!<br>
<br>
The custom action cleanup code I had to use is:<br>
<br>
my $T_Obj = $self->TicketObj;<br>
my $requestor_address = $T_Obj->RequestorAddresses;<br>
$RT::Logger->info("********* ReqAddr is $requestor_address");<br>
$T_Obj->DeleteWatcher (<br>
    Type  => "Requestor",<br>
    Email => "$requestor_address"<br>
);<br>
$RT::Logger->info("********* After deletewatcher");<br>
return 1;<br>
<br>
<br>
Thanks for your help guys :)<br>
<br>
<br>
<br>
<br>
Mathew Snyder wrote:
<blockquote cite="mid47149B83.4030807@yahoo.com" type="cite">
  <pre wrap="">This is a scrip I use for adding a requestor.  All you'd have to do is change
the AddWatcher to DeleteWatcher and set up your conditions to what you need:

Condition: User Defined
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

Custom condition:
You'll either want to come up with your own or set the condition above to On
Create or whatever.

Custom action preparation code:
return 1;

Custom action cleanup code:
$self->TicketObj->AddWatcher (
    Type  => 'Requestor',
    Email => '<a class="moz-txt-link-abbreviated" href="mailto:user@company.com">user@company.com</a>'
);

Keep up with me and what I'm up to: <a class="moz-txt-link-freetext" href="http://theillien.blogspot.com">http://theillien.blogspot.com</a>


Chris Nelson wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hello list,

I have a rather strange request, I want to delete a requestor when a
ticket is created.  Reason being, as the ticket is assigned to different
queues, replies to requestor are sent by the other queues, and that is
usually not needed for external requests. The easiest way to address
this would be to just remove the requestors on tickets created in that
queue.


Looking at the perldoc for Record.pm, I noticed that we can use
DeleteAttribute, so I tried:
Condition: On create
Action: User Defined
Template: Global Template: Blank
Stage: Transaction Create

Custom Condition:

Custom Action preparation Code: return 1;

Custom action cleanup code:

$self->TicketObj->DeleteAttribute('Requestor');



But nothing's actually happening, and the requestor is listed on the
webui still. Is there a better way to do this? Am I even barking up the
right tree? Thanks in advance for your help.


    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Chris Nelson

</pre>
</body>
</html>