[freeside-commits] branch master updated. 5ef60116554ff9dbd01bbb4daa4e1ba098905311

Christopher Burger burgerc at freeside.biz
Tue Jan 22 08:00:12 PST 2019


The branch, master has been updated
       via  5ef60116554ff9dbd01bbb4daa4e1ba098905311 (commit)
      from  438c813bf5a71dc6c09396acac85656b15139adf (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 5ef60116554ff9dbd01bbb4daa4e1ba098905311
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Jan 22 10:59:45 2019 -0500

    RT# 79352 - keep original email if all new emails are attached to other contacts on contact replace.

diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index f59fef927..13f07a283 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -468,6 +468,13 @@ sub replace {
 
     }
 
+    ## were all emails duplicates?  if so reset original emails
+    if (scalar @contact_emails < 1 && scalar (keys %contact_nums) > 1) {
+      foreach (qsearch('contact_email', {'contactnum' => $self->contactnum})) {
+        push @contact_emails, $_->emailaddress;
+      }
+    }
+
     my $emails = join(' , ', @contact_emails);
     $self->emailaddress($emails);
 

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

Summary of changes:
 FS/FS/contact.pm | 7 +++++++
 1 file changed, 7 insertions(+)




More information about the freeside-commits mailing list