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

Evergreen Git git at git.evergreen-ils.org
Fri Aug 16 10:34:17 EDT 2013


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  cdec380cf70ef29750490f4618b1826d69f3bbc5 (commit)
       via  589b83bdc500fc8946702207c362ac966e291d43 (commit)
       via  96f91f2fec04e21774fc6982a16b2b1999c8ee07 (commit)
      from  85c1d6333400942419f8741ed0af6b720c95fb0c (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 cdec380cf70ef29750490f4618b1826d69f3bbc5
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Aug 16 10:32:42 2013 -0400

    DB numbering for patron duplication check depth setting
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index e33fa31..475ba18 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0817', :eg_version); -- berick/Dyrcona
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0818', :eg_version); -- senator/csharp
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql b/Open-ILS/src/sql/Pg/upgrade/0818.data.duplicate_patron_check_depth_ou_setting.sql
similarity index 91%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
rename to Open-ILS/src/sql/Pg/upgrade/0818.data.duplicate_patron_check_depth_ou_setting.sql
index caa6c4e..27c0558 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0818.data.duplicate_patron_check_depth_ou_setting.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0818', :eg_version);
 
 INSERT INTO config.org_unit_setting_type ( name, grp, label, description, datatype ) VALUES (
     'circ.patron_edit.duplicate_patron_check_depth', 'circ',

commit 589b83bdc500fc8946702207c362ac966e291d43
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Aug 16 09:31:16 2013 -0400

    Adjust Kyle Tomita's patron dupe check fix to use the depth concept
    
    Addressing these comments:
    https://bugs.launchpad.net/evergreen/+bug/1185524/comments/3
    
    And also renaming the OU setting to better peer with similar settings
    affecting staff client (not OPAC) patron registration.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 1ea0f32..37ad23b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -1329,9 +1329,18 @@ sub patron_adv_search {
     my $opt_boundary = 0;
     $opt_boundary = $U->ou_ancestor_setting_value($e->requestor->ws_ou,'org.patron_opt_boundary') if user_opt_in_enabled($self);
 
-    #Only set search_ou if it is undef.  Set search_ou to Consortium (1) or the workstation org unit depending on Library Setting
-    $search_ou = ($U->ou_ancestor_setting_value($e->requestor->ws_ou, 'opac.duplicate_patron_check_use_consortium') == 1) ? 1 : $e->requestor->ws_ou if $search_ou == undef;
+    if (not defined $search_ou) {
+        my $depth = $U->ou_ancestor_setting_value(
+            $e->requestor->ws_ou,
+            'circ.patron_edit.duplicate_patron_check_depth'
+        );
 
+        if (defined $depth) {
+            $search_ou = $U->org_unit_ancestor_at_depth(
+                $e->requestor->ws_ou, $depth
+            );
+        }
+    }
     return $U->storagereq(
         "open-ils.storage.actor.user.crazy_search", $search_hash, 
             $search_limit, $search_sort, $include_inactive, $e->requestor->ws_ou, $search_ou, $opt_boundary);
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 47765d5..82d83dd 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4880,18 +4880,18 @@ INSERT into config.org_unit_setting_type
     ),
     'string', null)
 
-,( 'opac.duplicate_patron_check_use_consortium', 'opac',
+,( 'circ.patron_edit.duplicate_patron_check_depth', 'circ',
     oils_i18n_gettext(
-        'opac.duplicate_patron_check_use_consortium',
-        'Use consortium as the search ou for the duplicate patron check.',
+        'circ.patron_edit.duplicate_patron_check_depth',
+        'Specify search depth for the duplicate patron check in the patron editor',
         'coust',
         'label'),
     oils_i18n_gettext(
-        'opac.duplicate_patron_check_use_consortium',
-        'When using the patron registration page, the duplicate patron check will use the consortium as the search_ou.',
+        'circ.patron_edit.duplicate_patron_check_depth',
+        'When using the patron registration page, the duplicate patron check will use the configured depth to scope the search for duplicate patrons.',
         'coust',
         'description'),
-    'bool', null)
+    'integer', null)
 ;
 
 UPDATE config.org_unit_setting_type
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
index 957d278..caa6c4e 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
@@ -1,24 +1,22 @@
 BEGIN;
 
-    SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type ( name, grp, label, description, datatype ) VALUES (
+    'circ.patron_edit.duplicate_patron_check_depth', 'circ',
+    oils_i18n_gettext(
+        'circ.patron_edit.duplicate_patron_check_depth',
+        'Specify search depth for the duplicate patron check in the patron editor',
+        'coust',
+        'label'),
+    oils_i18n_gettext(
+        'circ.patron_edit.duplicate_patron_check_depth',
+        'When using the patron registration page, the duplicate patron check will use the configured depth to scope the search for duplicate patrons.',
+        'coust',
+        'description'),
+    'integer')
+;
 
-    INSERT INTO config.org_unit_setting_type ( name, grp, label, description, datatype ) VALUES (
-        'opac.duplicate_patron_check_use_consortium', 'opac',
-            oils_i18n_gettext(
-                'opac.duplicate_patron_check_use_consortium',
-                'Use consortium as the search ou for the duplicate patron check.',
-                'coust',
-                'label'),
-            oils_i18n_gettext(
-                'opac.duplicate_patron_check_use_consortium',
-                'When using the patron registration page, the duplicate patron check will use the consortium as the search_ou.',
-                'coust',
-                'description'),
-            'bool'
-    );
 
-    INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
-            1, 'opac.duplicate_patron_check_use_consortium', 'true'
-    );
 
 COMMIT;

commit 96f91f2fec04e21774fc6982a16b2b1999c8ee07
Author: Kyle Tomita <ktomita at catalystitservices.com>
Date:   Fri May 31 11:33:59 2013 -0700

    LP1185524 - Duplicate patron checking in the user editor is limited to workstation OU
    
    Added a new library setting opac.duplicate_patron_check_use_consortium.
    When true, the duplicate check will use the consortium (1) as the OU.
    When false or not set, the duplicate check will use the workstation OU.
    
    The setting is checked in subroutine that creates the search request and
    sets the OU accordingly.
    
    [LFW: Signing off but following with material changes next commit.]
    
    Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 0c25c51..1ea0f32 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -1329,6 +1329,9 @@ sub patron_adv_search {
     my $opt_boundary = 0;
     $opt_boundary = $U->ou_ancestor_setting_value($e->requestor->ws_ou,'org.patron_opt_boundary') if user_opt_in_enabled($self);
 
+    #Only set search_ou if it is undef.  Set search_ou to Consortium (1) or the workstation org unit depending on Library Setting
+    $search_ou = ($U->ou_ancestor_setting_value($e->requestor->ws_ou, 'opac.duplicate_patron_check_use_consortium') == 1) ? 1 : $e->requestor->ws_ou if $search_ou == undef;
+
     return $U->storagereq(
         "open-ils.storage.actor.user.crazy_search", $search_hash, 
             $search_limit, $search_sort, $include_inactive, $e->requestor->ws_ou, $search_ou, $opt_boundary);
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 433fbfd..47765d5 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4880,6 +4880,18 @@ INSERT into config.org_unit_setting_type
     ),
     'string', null)
 
+,( 'opac.duplicate_patron_check_use_consortium', 'opac',
+    oils_i18n_gettext(
+        'opac.duplicate_patron_check_use_consortium',
+        'Use consortium as the search ou for the duplicate patron check.',
+        'coust',
+        'label'),
+    oils_i18n_gettext(
+        'opac.duplicate_patron_check_use_consortium',
+        'When using the patron registration page, the duplicate patron check will use the consortium as the search_ou.',
+        'coust',
+        'description'),
+    'bool', null)
 ;
 
 UPDATE config.org_unit_setting_type
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
new file mode 100644
index 0000000..957d278
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
@@ -0,0 +1,24 @@
+BEGIN;
+
+    SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+    INSERT INTO config.org_unit_setting_type ( name, grp, label, description, datatype ) VALUES (
+        'opac.duplicate_patron_check_use_consortium', 'opac',
+            oils_i18n_gettext(
+                'opac.duplicate_patron_check_use_consortium',
+                'Use consortium as the search ou for the duplicate patron check.',
+                'coust',
+                'label'),
+            oils_i18n_gettext(
+                'opac.duplicate_patron_check_use_consortium',
+                'When using the patron registration page, the duplicate patron check will use the consortium as the search_ou.',
+                'coust',
+                'description'),
+            'bool'
+    );
+
+    INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
+            1, 'opac.duplicate_patron_check_use_consortium', 'true'
+    );
+
+COMMIT;

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Actor.pm  |   12 ++++++++++
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   12 ++++++++++
 ...ata.duplicate_patron_check_depth_ou_setting.sql |   22 ++++++++++++++++++++
 4 files changed, 47 insertions(+), 1 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0818.data.duplicate_patron_check_depth_ou_setting.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list