To all,
This can be found in many wiki examples, but since Richard asked, here
it is:
# set owner if Nobody
my $ticket = $self->TicketObj;
my $trans = $self->TransactionObj;
my $owner_id = $trans->CreatorObj->PrincipalId;
if ($ticket->OwnerObj->Name() eq 'Nobody' )
{
$ticket->SetOwner($owner_id, 'Force');
}
return 1;
There are, of course, variations for checking on the owner being
"Nobody" like: $RT::Nobody->Id. But I think you all get the idea.
Kenn
LBNL
On 10/21/2008 8:02 AM, Richard Hartmann wrote:
> On Tue, Oct 21, 2008 at 02:22, Kenneth Crocker <[EMAIL PROTECTED]> wrote:
>
>> I solved this by writing a global scrip that moves the creator of the
>> transaction into the owner field when the ticket is resolved AND the
>> owner = nobody. I do the same thing for when a ticket is opened. That
>> way they don't have to do a "take" and THEN own open it.
>
> Can you post that to this list/the wiki, please? Sounds pretty useful,
> to me.
>
>
> RIchard
>
_______________________________________________
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