[rt-users] Auto-own?

Kenneth Crocker kfcrocker at lbl.gov
Tue Jan 25 14:55:02 EST 2011


Kris,

We use a scrip for that:

Description: Auto Owner
Condition: User Defined
Action: User Defined
Template: Blank
Stage: TransactionBatch


Custom Condition:
# Check for Ticket Status changed to "open"

my $trans = $self->TransactionObj;

return ($trans->Type eq "Status" &&
        $trans->NewValue eq "open");

Custom action Prep Code:
# 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;

Custom action Cleanup Code:
return 1;

Works for us. Hope it helps.

Kenn
LBNL

On Tue, Jan 25, 2011 at 11:37 AM, Kris Germann <kris_germann at 295.ca> wrote:

> Just wondering if there is a way to give the ticket to a RT user account as
> soon as they open it, rather than leaving it up to them to ‘Take’ it?
>
>
>
> Also, I’m running this report here: Created < '3 days ago' AND ( Status !=
> 'rejected' OR Status != 'resolved' ) , which works for now, but is there a
> way to tell what this query does (how many tickets are < 3 days), but also
> tell me *how* old they actually are?
>
>
>
> Thanks
>
>
>
> Kris Germann
>
> Fibernetics Corporation
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110125/e8d73901/attachment.htm>


More information about the rt-users mailing list