Re: [rt-users] Assigning owner on reply

Viktor svitter at list.ru
Sun Jul 8 16:30:50 EDT 2007


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? :) 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 at evolving.com>
To: rt-users at 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 at 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 at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
> 



More information about the rt-users mailing list