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

Evergreen Git git at git.evergreen-ils.org
Mon Feb 23 17:07:50 EST 2015


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  c304ebb52b8249278b54d32efcfee86d779be48d (commit)
       via  4a1c335a4d229e66244dc0ce8a564dbe80be1049 (commit)
      from  5f648064b80c6f6e08174650a0dcb886e4d2f7a1 (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 c304ebb52b8249278b54d32efcfee86d779be48d
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Feb 23 20:25:02 2015 +0000

    LP#1154579: explicitly alert if copy location failed to be deleted
    
    This patch adds an alert if the act of deleting a copy
    location in the staff interface fails -- which would
    most commonly happen if there are still active items
    attached to the location to be deleted.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.js b/Open-ILS/xul/staff_client/server/admin/copy_locations.js
index 6ce174f..da25abc 100644
--- a/Open-ILS/xul/staff_client/server/admin/copy_locations.js
+++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.js
@@ -288,7 +288,10 @@ function clDelete( cl, tbody, row ) {
     var req = new Request( DELETE_CL, SESSION, cl.id() );
     req.send(true);
     var res = req.result();
-    if(checkILSEvent(res)) throw res;
+    if (checkILSEvent(res)) {
+        alertILSEvent(res);
+        return;
+    }
     alertId('cl_update_success');
     clGo();
 }

commit 4a1c335a4d229e66244dc0ce8a564dbe80be1049
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Feb 23 21:03:41 2015 +0000

    LP#1423813: adjust some queries to account for deleted copy locations
    
    This patch adjusts some queries so that if a copy location
    is deleted, any undeleted items that are attached to it
    are considered deleted for the purpose of generating
    OPAC item lists and seeing if items are potentially available
    to fill hold request.
    
    It should be noted that if a copy location is marked as
    logically deleted, there shouldn't be any undeleted
    copies associated with it.  However, as this condition is not
    presently enforced by a database contraint, adding additional
    checks on acpl.deleted provides some additional defense.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
index 09c30ee..b560bc9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
@@ -2021,7 +2021,10 @@ sub basic_opac_copy_query {
                     filter => {checkin_time => undef}
                 },
                 acpl => {
-                    ($staff ? () : (filter => { opac_visible => 't' }))
+                    filter => {
+                        deleted => 'f',
+                        ($staff ? () : ( opac_visible => 't' )),
+                    },
                 },
                 ccs => {
                     ($staff ? () : (filter => { opac_visible => 't' }))
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index a5f9e7e..5061f24 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -2577,7 +2577,11 @@ sub _check_title_hold_is_possible {
                         fkey   => 'call_number',
                         filter => { record => $titleid }
                     },
-                    acpl => { field => 'id', filter => { holdable => 't'}, fkey => 'location' },
+                    acpl => {
+                                field => 'id',
+                                filter => { holdable => 't', deleted => 'f' },
+                                fkey => 'location'
+                            },
                     ccs  => { field => 'id', filter => { holdable => 't'}, fkey => 'status'   },
                     acpm => { field => 'target_copy', type => 'left' } # ignore part-linked copies
                 }
@@ -2698,7 +2702,11 @@ sub _check_issuance_hold_is_possible {
                         fkey   => 'id',
                         filter => { issuance => $issuanceid }
                     },
-                    acpl => { field => 'id', filter => { holdable => 't'}, fkey => 'location' },
+                    acpl => {
+                        field => 'id',
+                        filter => { holdable => 't', deleted => 'f' },
+                        fkey => 'location'
+                    },
                     ccs  => { field => 'id', filter => { holdable => 't'}, fkey => 'status'   }
                 }
             },
@@ -2835,7 +2843,11 @@ sub _check_monopart_hold_is_possible {
                         fkey   => 'id',
                         filter => { part => $partid }
                     },
-                    acpl => { field => 'id', filter => { holdable => 't'}, fkey => 'location' },
+                    acpl => {
+                        field => 'id',
+                        filter => { holdable => 't', deleted => 'f' },
+                        fkey => 'location'
+                    },
                     ccs  => { field => 'id', filter => { holdable => 't'}, fkey => 'status'   }
                 }
             },
@@ -3806,7 +3818,11 @@ sub hold_has_copy_at {
         select => {acp => ['id'], acpl => ['name']},
         from   => {
             acp => {
-                acpl => {field => 'id', filter => { holdable => 't'}, fkey => 'location'},
+                acpl => {
+                    field => 'id',
+                    filter => { holdable => 't', deleted => 'f' },
+                    fkey => 'location'
+                },
                 ccs  => {field => 'id', filter => { holdable => 't'}, fkey => 'status'  }
             }
         },

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

Summary of changes:
 .../perlmods/lib/OpenILS/Application/AppUtils.pm   |    5 +++-
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |   24 ++++++++++++++++---
 .../staff_client/server/admin/copy_locations.js    |    5 +++-
 3 files changed, 28 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list