[freeside-commits] branch FREESIDE_3_BRANCH updated. 23c8996f73976d52a4380d616ed9276d9640f444

Mark Wells mark at 420.am
Sat Aug 17 17:09:59 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  23c8996f73976d52a4380d616ed9276d9640f444 (commit)
      from  c87b72a2b404eab57d1f1dc67c49dcfd70a696a3 (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 23c8996f73976d52a4380d616ed9276d9640f444
Author: Mark Wells <mark at freeside.biz>
Date:   Sat Aug 17 17:06:36 2013 -0700

    fix upgrade bug that was causing tickets to spontaneously resolve, #23309

diff --git a/FS/FS/TicketSystem.pm b/FS/FS/TicketSystem.pm
index 3aeadb3..c1c69fa 100644
--- a/FS/FS/TicketSystem.pm
+++ b/FS/FS/TicketSystem.pm
@@ -342,11 +342,6 @@ sub _upgrade_data {
     or die $dbh->errstr;
   $cve_2013_3373_sth->execute or die $cve_2013_3373_sth->errstr;
 
-  # fix null WillResolve fields to avoid spurious transactions the 
-  # first time they get updated
-  my $fix_null_sql = "UPDATE Tickets SET WillResolve = '1970-01-01 00:00:00' WHERE WillResolve IS NULL";
-  $dbh->do($fix_null_sql) or die $dbh->errstr;
-
   return;
 }
 
diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm
index 023dede..0c061e2 100644
--- a/rt/lib/RT/Interface/Web_Vendor.pm
+++ b/rt/lib/RT/Interface/Web_Vendor.pm
@@ -264,10 +264,11 @@ sub ProcessTicketBasics {
       my $DateObj = RT::Date->new($session{'CurrentUser'});
       if ( $to_date ) {
           $DateObj->Set(Format => 'unknown', Value => $to_date);
-      } else {
+          $ARGSRef->{'WillResolve'} = $DateObj->ISO;
+      } elsif ( $TicketObj and $TicketObj->WillResolveObj->Unix > 0 ) {
           $DateObj->Set(Value => 0);
+          $ARGSRef->{'WillResolve'} = $DateObj->ISO;
       }
-      $ARGSRef->{'WillResolve'} = $DateObj->ISO;
     }
 
     if ( $ARGSRef->{'Queue'} and ( $ARGSRef->{'Queue'} !~ /^(\d+)$/ ) ) {

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

Summary of changes:
 FS/FS/TicketSystem.pm             |    5 -----
 rt/lib/RT/Interface/Web_Vendor.pm |    5 +++--
 2 files changed, 3 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list