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

Evergreen Git git at git.evergreen-ils.org
Fri Jun 30 10:38:24 EDT 2017


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  58e662f046b178ad7696a288c9e26546216902a1 (commit)
      from  ba4ee40134658d19f1f453bc5ffe6972788db3ea (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 58e662f046b178ad7696a288c9e26546216902a1
Author: Jason Etheridge <jason at equinoxinitiative.org>
Date:   Mon Jun 26 08:11:28 2017 -0400

    lp1678152 webstaff fix Add Copies & Volumes
    
    Changes open-ils.cat.asset.volume.fleshed.batch.update,
    AssetCommon::create_volume, and Cat::Merge::merge_volumes
    to handle auto-volume merges during volume creation.
    
    Signed-off-by: Jason Etheridge <jason at equinoxinitiative.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
index 211e7c8..0800b88 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
@@ -1102,7 +1102,7 @@ sub fleshed_volume_update {
 
         } elsif( $vol->isnew ) {
             $logger->info("vol-update: creating volume");
-            $evt = $assetcom->create_volume( $oargs, $editor, $vol );
+            ($vol,$evt) = $assetcom->create_volume( $auto_merge_vols ? { all => 1} : $oargs, $editor, $vol );
             return $evt if $evt;
 
         } elsif( $vol->ischanged ) {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm
index 69e5b4b..4b81a46 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm
@@ -551,12 +551,10 @@ sub create_volume {
     if($label) {
         # now restore the label and merge into the existing record
         $vol->label($label);
-        (undef, $evt) = 
-            OpenILS::Application::Cat::Merge::merge_volumes($editor, [$vol], $$vols[0]);
-        return $evt if $evt;
+        return OpenILS::Application::Cat::Merge::merge_volumes($editor, [$vol], $$vols[0]);
     }
 
-    return undef;
+    return ($vol);
 }
 
 # returns the volume if it exists
@@ -598,10 +596,7 @@ sub find_or_create_volume {
     $vol->suffix($suffix);
     $vol->record($record_id);
 
-    my $evt = $class->create_volume(0, $e, $vol);
-    return (undef, $evt) if $evt;
-
-    return ($vol);
+    return $class->create_volume(0, $e, $vol);
 }
 
 

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Cat.pm    |    2 +-
 .../lib/OpenILS/Application/Cat/AssetCommon.pm     |   11 +++--------
 2 files changed, 4 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list