[rt-users] Mandatory Standard Fields
Kenneth Crocker
KFCrocker at lbl.gov
Tue Oct 21 17:15:05 EDT 2008
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 <KFCrocker at lbl.gov> 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
>
More information about the rt-users
mailing list