On Fri, Sep 25, 2009 at 09:55:23AM -0400, Mike Johnson wrote:
>    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");

You're not checking return values.

my ($status, $msg) = ....
log the status and message and find out why it isn't being set

-kevin

>    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: [1][email protected]
>    Technology assistance: email [2][email protected]
>    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 <[email protected]> 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).
> 
> References
> 
>    Visible links
>    1. mailto:[email protected]
>    2. mailto:[email protected]

> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: [email protected]
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com

Attachment: pgpMWCTfCmXWw.pgp
Description: PGP signature

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to