[rt-users] Remove requestor on create?

Roy El-Hames rfh at pipex.net
Wed Dec 19 10:59:26 EST 2007


Hi;

I don't think there is a need to change the creator to "Nobody", I think 
for  Matt's purposes just remove the requester, I have the following 
global scrip working for me:

Condition : On Create
User defined Action ,
prep code : return 1;
clean up code:

$self->TicketObj->DeleteWatcher(Type => 'Requestor', Email 
=>'emailaddress you want to remove') ;
return 1;

You can add if's if you want to be specific but if RT does not match the 
email address it moves on.

Regards;
Roy

Kenneth Crocker wrote:
> Matt,
>
>
>     I have set a few other fields before, but not the "Requestor". I 
> think the condition should be like this:
>
> #---------------------------------------------------------------------------- 
>
> # Custom condition:
> #---------------------------------------------------------------------------- 
>
>
> # determine source of transaction
>
> my $trans;
> my $msgattr;
>
> $trans = $self->TransactionObj;
> return 0 unless $trans->Type eq "Create";
> $msgattr = $trans->Message->First;
> return 0 unless $msgattr;
> return 1 if $msgattr->GetHeader('Received');
> return 0;
>
>
>     This will make sure the actor gets set ONLY if it is an email 
> create. Then I would either set the TRANSACTION creator like this PREP 
> code:
>
> #---------------------------------------------------------------------------- 
>
> # Custom action preparation code:
> #---------------------------------------------------------------------------- 
>
>
> # set Creator to “Nobody”
>
> my $Trans = $self->TransactionObj;
> $Trans->SetCreatorId(10, 'Force');
> return 1;
>
> maybe that should be "SetCreator" instead of "SetCreatorId"?
>
>         OR
>
>     you could change the Ticket Requestor like this cleanup code:
>
> #---------------------------------------------------------------------------- 
>
> # Custom action preparation code:
> #---------------------------------------------------------------------------- 
>
>
> return 1;
>
> #---------------------------------------------------------------------------- 
>
> # Custom action cleanup code:
> #---------------------------------------------------------------------------- 
>
>
> # set Requestor to “Nobody”
>
> my $Ticket = $self->TicketObj;
> $Ticket->SetRequestor(10, 'Force');
> return 1;
>
>
>     I'm not sure I have the right object names for the actor "Creator" 
> or "Requestor". That might have to change, but the logic and condition 
> code should work. Hope this helps.
>
>
> Kenn
> LBNL
>
>
> On 12/18/2007 11:25 AM, Millard, Matt wrote:
>> I'm looking for a way to remove the requestor from server generated
>> email tickets.  These would be from "root at sys1.example.com" or
>> "alom-admin at sys1000.example.com". Basically what I'm trying to prevent
>> is any email getting sent back out of RT to a system that is simply
>> going to bounce the email.  Our servers don't accept incoming mail and
>> bounce it back to Exchange. 
>> Any thoughts on how I could do this?  I've looked through the wiki and
>> didn't find anything like this.
>>
>> Matt
>>
>>
>> -----Message Disclaimer-----
>>
>> This e-mail message is intended only for the use of the individual or
>> entity to which it is addressed, and may contain information that is
>> privileged, confidential and exempt from disclosure under applicable 
>> law.
>> If you are not the intended recipient, any dissemination, 
>> distribution or
>> copying of this communication is strictly prohibited. If you have
>> received this communication in error, please notify us immediately by
>> reply email to Connect at principal.com and delete or destroy all copies of
>> the original message and attachments thereto. Email sent to or from the
>> Principal Financial Group or any of its member companies may be retained
>> as required by law or regulation.
>>
>> Nothing in this message is intended to constitute an Electronic 
>> signature
>> for purposes of the Uniform Electronic Transactions Act (UETA) or the
>> Electronic Signatures in Global and National Commerce Act ("E-Sign")
>> unless a specific statement to the contrary is included in this message.
>>
>> While this communication may be used to promote or market a transaction
>> or an idea that is discussed in the publication, it is intended to 
>> provide
>> general information about the subject matter covered and is provided 
>> with
>> the understanding that The Principal is not rendering legal, accounting,
>> or tax advice. It is not a marketed opinion and may not be used to avoid
>> penalties under the Internal Revenue Code. You should consult with
>> appropriate counsel or other advisors on all matters pertaining to 
>> legal,
>> tax, or accounting obligations and requirements.
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
>>
>> If you sign up for a new RT support contract before December 31, 
>> we'll take
>> up to 20 percent off the price. This sale won't last long, so get in 
>> touch today.     Email us at sales at bestpractical.com or call us at +1 
>> 617 812 0745.
>>
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
>> Buy a copy at http://rtbook.bestpractical.com
>>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
>
> If you sign up for a new RT support contract before December 31, we'll 
> take
> up to 20 percent off the price. This sale won't last long, so get in 
> touch today.    Email us at sales at bestpractical.com or call us at +1 
> 617 812 0745.
>
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
>




More information about the rt-users mailing list