[freeside-commits] branch master updated. e01fcd6e0328c2fa988be7c4df0b9c833323c1a9

Mark Wells mark at 420.am
Fri Apr 27 14:22:58 PDT 2012


The branch, master has been updated
       via  e01fcd6e0328c2fa988be7c4df0b9c833323c1a9 (commit)
      from  03dc5996825a284a3bb922324402730f9f2e404f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e01fcd6e0328c2fa988be7c4df0b9c833323c1a9
Author: Mark Wells <mark at freeside.biz>
Date:   Fri Apr 27 14:22:55 2012 -0700

    fix some warnings in ticket escalation, #17417

diff --git a/rt/lib/RT/Action/Accumulate.pm b/rt/lib/RT/Action/Accumulate.pm
index c4ca667..14675b8 100644
--- a/rt/lib/RT/Action/Accumulate.pm
+++ b/rt/lib/RT/Action/Accumulate.pm
@@ -23,7 +23,8 @@ the same name, and should be single-valued fields.
 sub Prepare {
     my $self = shift;
     my $cfname = $self->Argument or return 0;
-    $self->{'inc_by'} = $self->TransactionObj->FirstCustomFieldValue($cfname);
+    $self->{'inc_by'} = $self->TransactionObj->FirstCustomFieldValue($cfname) 
+                        || '';
     return ( $self->{'inc_by'} =~ /^(\d+)$/ );
 }
 
diff --git a/rt/lib/RT/Action/EscalateQueue.pm b/rt/lib/RT/Action/EscalateQueue.pm
index adafbdf..2775a83 100755
--- a/rt/lib/RT/Action/EscalateQueue.pm
+++ b/rt/lib/RT/Action/EscalateQueue.pm
@@ -116,15 +116,18 @@ sub Commit {
     if ( my $due_in = $new_queue->DefaultDueIn ) {
         $Due->SetToNow;
         $Due->AddDays( $due_in );
-    }
-    ( $val, $msg ) = $ticket->_Set(
-      Field => 'Due',
-      Value => $Due->ISO,
-      RecordTransaction => 0,
-    );
-    if (! $val) {
-        $RT::Logger->error( "Couldn't set new due date: $msg" );
-        return (0, $msg);
+        
+        if ( $Due->ISO ne $ticket->Due ) {
+            ( $val, $msg ) = $ticket->_Set(
+              Field => 'Due',
+              Value => $Due->ISO,
+              RecordTransaction => 0,
+            );
+            if (! $val) {
+                $RT::Logger->error( "Couldn't set new due date: $msg" );
+                return (0, $msg);
+            }
+        }
     }
     return 1;
 }
diff --git a/rt/lib/RT/Tickets_Overlay.pm b/rt/lib/RT/Tickets_Overlay.pm
index 0d482cd..3ed1605 100644
--- a/rt/lib/RT/Tickets_Overlay.pm
+++ b/rt/lib/RT/Tickets_Overlay.pm
@@ -1994,7 +1994,6 @@ sub _FreesideFieldLimit {
     }
 
     $subfield = $rest{SUBKEY} || $pkey;
-    my $table2;
     # compound subkey: separate into table name and field in that table
     # (must be linked by custnum)
     $subfield = lc($subfield);

-----------------------------------------------------------------------

Summary of changes:
 rt/lib/RT/Action/Accumulate.pm    |    3 ++-
 rt/lib/RT/Action/EscalateQueue.pm |   21 ++++++++++++---------
 rt/lib/RT/Tickets_Overlay.pm      |    1 -
 3 files changed, 14 insertions(+), 11 deletions(-)




More information about the freeside-commits mailing list