[rt-users] SetStatus and SetOwner scrip question

Mike Johnson Mike.Johnson at NorMed.ca
Fri Sep 25 09:55:23 EDT 2009


Hi Kevin,
 
Thx for that tidbit of info,
 
In that file I found the correct syntax, out of Sean's set, the 2 below will work,
 
$self->TicketObj->SetOwner("Nobody");
$self->TicketObj->SetOwner("10");
 
But, this is baffling me...
 
This is my scrip
 
Condition: On Queue Change
Action: User Defined
Custom action Preparation Code:
# set new Ticket Owner value
my $ticket = $self->TicketObj;
$ticket->SetStatus("new");
$ticket->SetOwner("Nobody");
 
Based on the above investigation, I know the syntax is correct for the SetOwner.  However, the only thing that happens on queue change is the ticket's status is set to new.  That shows up in the ticket history.  The SetOwner doesn't show up at all, nothing happens.
 
This is the exact same spot Sean got stuck.... and the thread ended.....
 
 
Ken Crocker(thx Ken) provided the above code + 1 line (return 1;) and said his is in the cleanup code spot.  If I put that code in there, absolutely nothing gets changed in the ticket...
 
Any thoughts anyone?
 
 
 
 
 
Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON   P7B 5E1
Phone: 807.766.7331
Email: mike.johnson at normed.ca 
Technology assistance: email nosmhelpdesk at normed.ca 
Technology Emergency Contact (TEC) Mon-Fri, 8am to 5pm excluding stat holidays: 
Off campus toll free 1-800-461-8777, option 8, or locally either 
(705)-662-7120 or (807)-766-7500


>>> Kevin Falcone <falcone at bestpractical.com> 24/09/2009 5:06 pm >>>
On Thu, Sep 24, 2009 at 04:02:10PM -0400, Mike Johnson wrote:
>    I was looking through the list's history.
> 
>    The original email did not get an answer to it.
> 
>    The piece that interests me about this listserv topic(dating back to Aug 2007)....
> 
> 
>    Sean, and myself are trying to set a ticket's owner to nobody on an action...
> 
>    He stated,
> 
>    I've tried:
> 
>    $self->TicketObj->SetOwner("Nobody");
>    $self->TicketObj->SetOwner(Nobody);
>    $self->TicketObj->SetOwner("10");
>    $self->TicketObj->SetOwner(10);
>    $self->TicketObj->SetOwner(Name => "Nobody");
>    $self->TicketObj->SetOwner(Name => Nobody);
>    $self->TicketObj->SetOwner(Id => "10");
>    $self->TicketObj->SetOwner(Id => 10);
> 
>    None of these has worked and nothing in rt.log indicates any problems.  I have
>    it set up with debug so I know I'm getting as much info as I can.

If you want as much information as possible, you should check the
return values of SetOwner.  The arguments for the SetOwner method are
documented in Ticket_Overlay.pm.

-kevin

>    Can anyone tell me which of the above? and what else do I need to set to make this happen on a
>    specific condition(I'm using On Queue change).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090925/70ac7966/attachment.htm>


More information about the rt-users mailing list