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

Evergreen Git git at git.evergreen-ils.org
Fri Feb 10 17:26:58 EST 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  53adf05f08e1e5b523d59d22999143afbac707d2 (commit)
       via  7161adb3bbf05c6b156c73829bbeab7e4bf0a13b (commit)
      from  a8d0df0254bfd376b972e1784d30f197dd795ff4 (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 53adf05f08e1e5b523d59d22999143afbac707d2
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Jan 3 11:59:26 2017 -0500

    LP#1653742 Copy tree authoritative API share cstores
    
    Avoid opening one cstore connection per requested org unit in the
    open-ils.cat.asset.copy_tree.retrieve.authoritative API by creating a
    single shared cstore connection at the top of the API shared by all
    API actions.
    
    To test:
    
    1. In one terminal:
    
    % tail osrfsys.log | grep transaction.begin
    
    2. In another terminal:
    
    srfsh% request open-ils.cat
    open-ils.cat.asset.copy_tree.retrieve.authoritative "AUTOTOKEN", 217,
    [1,2,3,4,5,6,7,8,9]
    
    3. 9 cstore transactions are opened before patching.  After patching,
    only 1 is created.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
index 5267ddd..87409e2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
@@ -640,14 +640,19 @@ sub retrieve_copies {
         @org_ids = ($user_obj->home_ou);
     }
 
+    # Create an editor that can be shared across all iterations of 
+    # _build_volume_list().  Otherwise, .authoritative calls can result 
+    # in creating too many cstore connections.
+    my $e = new_editor();
+
     if( $self->api_name =~ /global/ ) {
-        return _build_volume_list( { record => $docid, deleted => 'f', label => { '<>' => '##URI##' } } );
+        return _build_volume_list($e, { record => $docid, deleted => 'f', label => { '<>' => '##URI##' } } );
 
     } else {
 
         my @all_vols;
         for my $orgid (@org_ids) {
-            my $vols = _build_volume_list( 
+            my $vols = _build_volume_list($e,
                     { record => $docid, owning_lib => $orgid, deleted => 'f', label => { '<>' => '##URI##' } } );
             push( @all_vols, @$vols );
         }
@@ -660,10 +665,12 @@ sub retrieve_copies {
 
 
 sub _build_volume_list {
+    my $e = shift;
     my $search_hash = shift;
 
+    $e ||= new_editor();
+
     $search_hash->{deleted} = 'f';
-    my $e = new_editor();
 
     my $vols = $e->search_asset_call_number([
         $search_hash,

commit 7161adb3bbf05c6b156c73829bbeab7e4bf0a13b
Author: Jason Stephenson <jason at sigio.com>
Date:   Fri Dec 9 20:45:33 2016 -0500

    LP 1648918: Remove Workstation at Root of User's Permission Tree
    
    If you register a workstation at the root of the user's permission
    tree in the webstaff client, you are not able to later remove it.  The
    Remove button is dimmed.  You can remove a workstation registered at
    any other org_unit where the user has the REGISTER_WORKSTATION
    permission.
    
    To reproduce this bug, login as the admin user and register a
    workstation at the CONS org_unit.  Then, go to Workstation
    Administration and see that the Remove button is dimmed.
    
    To test the patch, do the same, but see that the Remove button is not
    dimmed.  When you click it, the workstation is also removed.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js
index c8bcb60..9723c021 100644
--- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js
+++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js
@@ -817,7 +817,7 @@ function($scope , $q , $window , $location , egCore , egAlertDialog , workstatio
     $scope.can_delete_ws = function(name) {
         var ws = all_workstations.filter(
             function(ws) { return ws.name == name })[0];
-        return ws && reg_perm_orgs.indexOf(ws.owning_lib);
+        return ws && reg_perm_orgs.indexOf(ws.owning_lib) != -1;
     }
 
     $scope.remove_ws = function(remove_me) {

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Cat.pm    |   13 ++++++++++---
 .../js/ui/default/staff/admin/workstation/app.js   |    2 +-
 2 files changed, 11 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list