[Rt-devel] Reminders in 3.8 vs 3.6 (links, scrips)

Ivan Kohler ivan-rt-devel at 420.am
Wed Jul 28 15:53:55 EDT 2010


In 3.8, the "reminders are tickets" abstraction seems to be leaking a 
bit, at least relative to 3.6.  Apologies if this has been covered 
before (I could not find anything conclusive), or if I'm again patching 
around something that's solved properly differently.

The first thing we're noticing is that adding a reminder shows a link to 
the reminder ticket in the history.  In addition to the "Reminder 
'[subject]' added" transaction, there's also a "Reference by ticket #NN" 
which did not show up in 3.6.  It seems extraneous to me and also 
exposes a ticket number for a thing that really isn't a ticket.

This patch fixes:

--- lib/RT/Ticket_Overlay.pm    27 Jul 2010 09:02:48 -0000      1.13
+++ lib/RT/Ticket_Overlay.pm    27 Jul 2010 10:09:30 -0000      1.14
@@ -617,11 +617,16 @@
                     next;
                 }
             }
-            
+
+            #don't show transactions for reminders
+            my $silent = ( !$args{'_RecordTransaction'}
+                           || $self->Type eq 'reminder'
+                         );
+
             my ( $wval, $wmsg ) = $self->_AddLink(
                 Type                          => 
$LINKTYPEMAP{$type}->{'Type'},
                 $LINKTYPEMAP{$type}->{'Mode'} => $link,
-                Silent                        => !$args{'_RecordTransaction'},
+                Silent                        => $silent,
                 'Silent'. ( $LINKTYPEMAP{$type}->{'Mode'} eq 'Base'? 'Target': 'Base' )
                                               => 1,
             );


The second thing we're noticing is scrips firing off for the reminder.  
Specifically, AdminCc:s on the queue are getting Create messages about 
new "tickets' for every reminder.  Unlike the previous problem I 
couldn't track down a specific 3.6->3.8 change which causes this, but 
nevertheless it is easy to eliminate.  Patch follows.

--- lib/RT/Ticket_Overlay.pm    27 Jul 2010 10:09:30 -0000      1.14
+++ lib/RT/Ticket_Overlay.pm    28 Jul 2010 19:32:58 -0000      1.15
@@ -721,7 +721,8 @@
         );
     }
 
-    if ( $args{'_RecordTransaction'} ) {
+    #don't make a transaction or fire off any scrips for reminders either
+    if ( $args{'_RecordTransaction'} && $self->Type ne 'reminder' ) {
 
         # {{{ Add a transaction for the create
         my ( $Trans, $Msg, $TransObj ) = $self->_NewTransaction(



-- 
Ivan Kohler
Open-source billing, ticketing and provisioning
for ISPs, VoIP providers and online businesses
http://www.freeside.biz/freeside/


More information about the rt-devel mailing list