[freeside-commits] branch master updated. 7d38afc8a7175c836721400f3b08f84f1c20ea4f

Jonathan Prykop jonathan at 420.am
Tue Jul 5 16:36:57 PDT 2016


The branch, master has been updated
       via  7d38afc8a7175c836721400f3b08f84f1c20ea4f (commit)
      from  3531bdf7f4843562539228d8c973bf649f4819c8 (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 7d38afc8a7175c836721400f3b08f84f1c20ea4f
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Tue Jul 5 18:35:41 2016 -0500

    RT#17599: display cancelled services from history [bug fixes]

diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 4ad9639..6616257 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -1265,7 +1265,13 @@ sub uncancel_svc_summary {
           'uncancel_svcnum' => $svc_x->get('_h_svc_x')->svcnum,
         };
         $svc_x->pkgnum($self->pkgnum); # provisioning services on a canceled package, will be rolled back
-        if ($opt{'no_test_reprovision'} or $svc_x->insert) {
+        my $insert_error;
+        unless ($opt{'no_test_reprovision'}) {
+          # avoid possibly fatal errors from missing linked records
+          eval { $insert_error = $svc_x->insert };
+          $insert_error ||= $@;
+        }
+        if ($opt{'no_test_reprovision'} or $insert_error) {
           # avoid possibly fatal errors from missing linked records
           eval { $out->{'label'} = $svc_x->label };
           eval { $out->{'label'} = $svc_x->get('_h_svc_x')->label } unless defined($out->{'label'});
diff --git a/FS/FS/h_svc_acct.pm b/FS/FS/h_svc_acct.pm
index 6e127a2..6bc55eb 100644
--- a/FS/FS/h_svc_acct.pm
+++ b/FS/FS/h_svc_acct.pm
@@ -29,6 +29,7 @@ FS::h_svc_acct - Historical account objects
 sub svc_domain {
   my $self = shift;
   local($FS::Record::qsearch_qualify_columns) = 0;
+  $_[0] ||= $self->history_date;
   qsearchs( 'h_svc_domain',
             { 'svcnum' => $self->domsvc },
             FS::h_svc_domain->sql_h_searchs(@_),
diff --git a/FS/FS/h_svc_forward.pm b/FS/FS/h_svc_forward.pm
index 7f6a5cc..bc24fe9 100644
--- a/FS/FS/h_svc_forward.pm
+++ b/FS/FS/h_svc_forward.pm
@@ -35,6 +35,7 @@ sub srcsvc_acct {
 
   local($FS::Record::qsearch_qualify_columns) = 0;
 
+  $_[0] ||= $self->history_date;
   my $h_svc_acct = qsearchs(
     'h_svc_acct',
     { 'svcnum' => $self->srcsvc },
@@ -58,6 +59,7 @@ sub dstsvc_acct {
 
   local($FS::Record::qsearch_qualify_columns) = 0;
 
+  $_[0] ||= $self->history_date;
   my $h_svc_acct = qsearchs(
     'h_svc_acct',
     { 'svcnum' => $self->dstsvc },
diff --git a/FS/FS/h_svc_www.pm b/FS/FS/h_svc_www.pm
index e719f1b..d3f9811 100644
--- a/FS/FS/h_svc_www.pm
+++ b/FS/FS/h_svc_www.pm
@@ -34,6 +34,7 @@ sub domain_record {
   carp 'Called FS::h_svc_www->domain_record on svcnum ' . $self->svcnum if $DEBUG;
 
   local($FS::Record::qsearch_qualify_columns) = 0;
+  $_[0] ||= $self->history_date;
   my $domain_record = qsearchs(
     'h_domain_record',
     { 'recnum' => $self->recnum },

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

Summary of changes:
 FS/FS/cust_pkg.pm      |    8 +++++++-
 FS/FS/h_svc_acct.pm    |    1 +
 FS/FS/h_svc_forward.pm |    2 ++
 FS/FS/h_svc_www.pm     |    1 +
 4 files changed, 11 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list