[open-ils-commits] [GIT] Evergreen ILS branch master updated. d61f82770aab55dc56637ddc2563081932bb9185

Evergreen Git git at git.evergreen-ils.org
Wed May 1 09:25:08 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  d61f82770aab55dc56637ddc2563081932bb9185 (commit)
      from  32ea581006ad7acaa8e51ad007809779c30e1b77 (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 d61f82770aab55dc56637ddc2563081932bb9185
Author: Jason Stephenson <jason at sigio.com>
Date:   Thu Oct 11 08:50:30 2018 -0400

    LP 1333893: Keep Empty Bib on Volume Transfer
    
    Volume transfer did not honor the cat.bib_keep_on_empty organizational
    unit setting when removing empty bib records.  This commit changes it
    so that tranfer honors the setting in the same manner that deleting
    copies and volumes does.
    
    To test this fix, set cat.bib_keep_on_empty for your workstation
    org. unit to true, and then transfer all of the volumes from one bib
    record to another.  The empty bib record should not get deleted.
    
    You can also test with the setting on false to make sure that the
    empty bib gets deleted.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Beth Willis <willis at noblenet.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
index 3fcd255e45..831633717d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
@@ -1486,12 +1486,14 @@ sub batch_volume_transfer {
         }
 
         # Now see if any empty records need to be deleted after all of this
-
-        for(@rec_ids) {
-            $logger->debug("merge: seeing if we should delete record $_...");
-            $evt = OpenILS::Application::Cat::BibCommon->delete_rec($e, $_) 
-                if OpenILS::Application::Cat::BibCommon->title_is_empty($e, $_);
-            return $evt if $evt;
+        my $keep_on_empty = $U->ou_ancestor_setting_value($e->requestor->ws_ou, 'cat.bib.keep_on_empty', $e);
+        unless ($U->is_true($keep_on_empty)) {
+            for (@rec_ids) {
+                $logger->debug("merge: seeing if we should delete record $_...");
+                $evt = OpenILS::Application::Cat::BibCommon->delete_rec($e, $_)
+                    if OpenILS::Application::Cat::BibCommon->title_is_empty($e, $_);
+                return $evt if $evt;
+            }
         }
     }
 

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

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list