[rt-users] Scrip help

Kenneth Crocker KFCrocker at lbl.gov
Thu Oct 18 14:27:36 EDT 2007


Mathew,


	It worked great! Thanks! I figured I might need the object id as 
opposed to name. I didn't realise I needed to do a force either. Thanks 
again.


Kenn
LBNL

On 10/18/2007 10:48 AM, Mathew Snyder wrote:
> Custom action preparation code:
> return 1;
> 
> Custom action cleanup code:
> $RT::Logger->debug("trying to set owner");
> my ($code, $msg) = $self->TicketObj->SetOwner(10, 'Force');
> $RT::Logger->debug("set owner: $code: $msg");
> 
> return 1;
> 
> 
> 
> Keep up with me and what I'm up to: http://theillien.blogspot.com
> 
> 
> Kenneth Crocker wrote:
>> To all,
>>
>>
>>     I have a scrip that is supposed to modify the ticket owner to
>> "Nobody" when the ticket is moved to another queue. What I have is:
>>
>> Name: Mod Owner on Q chg
>> Condition: On Queue Change
>> Action: User Defined
>> Template: Blank
>> Stage: TransactionBatch
>>
>> Custom Condition: none
>> Custom Action Prep Code:
>> # set new Ticket Owner value
>>
>> my $Ticket = $self->TicketObj;
>> $Ticket->SetOwner('Nobody');
>> return 1;
>>
>> Custom Action Cleanup Code: none
>>
>>     Actually, I also tried it with Return 1: in the prep code and the
>> modifying code in the cleanup and still no go with either way. Here I
>> was thinking it would be a simple scrip and I can't get it to work. I am
>> also executing a notification scrip for the same condition and it works.
>> Anyone have an idea on what's wrong? Thanks.
>>
>>
>> Kenn
>> LBNL
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> 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