Assigning owner on reply

Can anyone please help,

I am new to RT and I am trying to work out if I can set the owner of a
ticket to be someone who responds to a ticket. Current when a ticket is
created a mail is sent to a team of people and it would be useful if as
soon as someone updated the ticket is was assigned to that user.

Thanks
Matt
This e-mail and any attachments may be confidential and/or legally privileged. If you have received this e-mail and you are not a named addressee, please inform Evolving Systems TIS at tis@evolving.com and then delete the e-mail from your system. If you are not a named addressee you must not use, disclose, distribute, copy, print or rely on this e-mail. To ensure regulatory compliance and for the protection of our clients and business, Evolving Systems may monitor and read e-mails sent to and from its servers. Although Evolving Systems routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Evolving Systems makes no representation or warranty as to the absence of viruses in this e-mail or any attachments.

Registered Office: One Angel Square, Torrens Street, London. EC1V 1PL. Registered number 2325854

Hi Matt,

Here’s how I use a queue-context scrip to assign owner when an admincc
replies to a ticket.

Description: Set owner via e-mail
Condition: User Defined
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

Custom condition:
{ ### True if e-mail is from admincc member
my $Ticket = $self->TicketObj;
my $Transaction = $self->TransactionObj;
my $CreatorId = $Transaction->CreatorObj->Id;
my $Queue = $self->TicketObj->QueueObj;
my $val = $Transaction->Type eq ‘Correspond’
&& $Queue->IsAdminCc($CreatorId);
return $val;
}

Custom action preparation code:
return 1;

Custom action cleanup code:

Set owner to e-mail sender

my $Ticket = $self->TicketObj;
my $Transaction = $self->TransactionObj;
my $CreatorId = $Transaction->CreatorObj->Id;

I use this because I don’t want to create a transaction

$Ticket->_Set(Field=>‘Owner’, Value=>$CreatorId, RecordTransaction=>0);

Could use the following instead if you don’t mind triggering another event

$Ticket->SetOwner($CreatorId);

Regards,
Gene

At 12:07 AM 7/4/2007, Matt Weller wrote:

Can anyone please help,

I am new to RT and I am trying to work out if I can set the owner of a
ticket to be someone who responds to a ticket. Current when a ticket is
created a mail is sent to a team of people and it would be useful if as
soon as someone updated the ticket is was assigned to that user.

Thanks
Matt This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this e-mail and you are not a named
addressee, please inform Evolving Systems TIS at tis@evolving.com and then
delete the e-mail from your system. If you are not a named addressee you
must not use, disclose, distribute, copy, print or rely on this e-mail. To
ensure regulatory compliance and for the protection of our clients and
business, Evolving Systems may monitor and read e-mails sent to and from
its servers. Although Evolving Systems routinely screens for viruses,
addressees should scan this e-mail and any attachments for viruses.
Evolving Systems makes no representation or warranty as to the absence of
viruses in this e-mail or any attachments.

Registered Office: One Angel Square, Torrens Street, London. EC1V 1PL.
Registered number 2325854


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

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

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

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Hi, Matt.

Here is the patch to rt-3.6.3 codebase to assign the ticket to the user acting upon it.
The idea is to patch ‘sub SetStatus’ located at lib/RT/Ticket_Overlay.pm so that it automatically ‘Takes’ the given ticket on behalf of the ‘CurrentUser’ (or 'Steal’s it if it has an owner by that moment). If you use another version of rt, please keep in mind you should Take/Steal the ticket just after ACL/dependencies check and before any changes.

There should be a solution built upon scips but I would advise you to avoid them in this particular situation. An owner should be set for every ticket acted upon, as early as possible, no matter the queue, no matter the status, no matter any other conditions. Shouldn’t it? :slight_smile: Hope this helps.

— lib/RT/Ticket_Overlay.pm Fri Dec 1 22:00:23 2006
+++ local/lib/RT/Ticket_Overlay.pm Fri Mar 23 00:16:59 2007
@@ -3233,6 +3233,16 @@
return (0, $self->loc(‘That ticket has unresolved dependencies’));
}

  • if ( $RT::SystemUser->Id != $self->CurrentUser->Id ) {
  •    my ( $trans_id, $message );
    
  •    if ( $RT::Nobody->Id == $self->OwnerObj->Id ) {
    
  •        ( $trans_id, $message ) = $self->Take();
    
  •    } elsif ( !$self->IsOwner( $self->CurrentUser ) ) {
    
  •        ( $trans_id, $message ) = $self->Steal();
    
  •    }
    
  •    return ( 0, $message ) unless ( $trans_id || !$message );
    
  • }
    my $now = RT::Date->new( $self->CurrentUser );
    $now->SetToNow();-----Original Message-----
    From: Matt Weller matt.weller@evolving.com
    To: rt-users@lists.bestpractical.com
    Date: Wed, 04 Jul 2007 08:07:14 +0100
    Subject: [rt-users] Assigning owner on reply

Can anyone please help,

I am new to RT and I am trying to work out if I can set the owner of a
ticket to be someone who responds to a ticket. Current when a ticket is
created a mail is sent to a team of people and it would be useful if as
soon as someone updated the ticket is was assigned to that user.

Thanks
Matt
This e-mail and any attachments may be confidential and/or legally privileged. If you have received this e-mail and you are not a named addressee, please inform Evolving Systems TIS at tis@evolving.com and then delete the e-mail from your system. If you are not a named addressee you must not use, disclose, distribute, copy, print or rely on this e-mail. To ensure regulatory compliance and for the protection of our clients and business, Evolving Systems may monitor and read e-mails sent to and from its servers. Although Evolving Systems routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Evolving Systems makes no representation or warranty as to the absence of viruses in this e-mail or any attachments.

Registered Office: One Angel Square, Torrens Street, London. EC1V 1PL. Registered number 2325854


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

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

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