AW: [rt-users] assign ticket owner to nobody on resolve

Loos, Christian CLoos at netcologne.de
Tue Feb 27 04:40:30 EST 2007


Hello Steve,

with argument 'Force' everything works fine.

Thanks
Chris

-----Ursprüngliche Nachricht-----
Von: Stephen Turner [mailto:sturner at MIT.EDU]
Gesendet: Montag, 26. Februar 2007 17:50
An: Loos, Christian; rt-users at lists.bestpractical.com
Betreff: Re: [rt-users] assign ticket owner to nobody on resolve


At Monday 2/26/2007 11:02 AM, Loos, Christian wrote:
>Hello,
>
>ich take the script from wiki 
>http://wiki.bestpractical.com/index.cgi?AutoSetOwner an modified it.
>My script looks like:
>
>condition: on resolve
>action: user defined
>template: global template: blank
>stage: transaction create
>
>custom action preparation code:
>return 1;
>
>custom action cleanup code:
>my $owner = $RT::Nobody->id;
>my ($status, $msg) = $self->TicketObj->SetOwner( $owner );
>unless( $status ) {
>   $RT::Logger->error( "Impossible to assign the ticket to $owner on 
> resolve: $msg" );
>   return undef;
>}
>return 1;
>
>
>The error log says:
>Impossible to assign the ticket to 10 on resolve: You can only 
>reassign tickets that you own or that are unowned ((eval 515):4)
>
>On this point i am the owner of the ticket.
>If i change the owner on the resolve page everything works fine.
>
>Why does this script doesn't work?
>Any ideas?

I'd guess that when the scrip runs, the CurrentUser is not you - so 
RT thinks someone else is trying to change the ticket ownership. Try 
adding'Force' as a second argument to the SetOwner call.

Look in $RTHOME/lib/RT/Ticket_Overlay.pm   ( SetOwner method) to see 
what's going on

Steve   




More information about the rt-users mailing list