[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. f844bfc0ebd14569cf48b48c6b9076efe0ad549b

Evergreen Git git at git.evergreen-ils.org
Fri Aug 16 10:37:42 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, rel_2_3 has been updated
       via  f844bfc0ebd14569cf48b48c6b9076efe0ad549b (commit)
       via  a7017eb786935223d2a2013d6347d9c31a9bd945 (commit)
       via  1eb958dede143e3227b52196dda1f0d05fd0cfcf (commit)
      from  fd9fb9ee7811f6b7fa9dcb4f6301c2dfc4fcf89d (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 f844bfc0ebd14569cf48b48c6b9076efe0ad549b
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>
    
    Conflicts:
    	Open-ILS/src/sql/Pg/002.schema.config.sql

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index f99a03a..958ee61 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -87,7 +87,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 ('0811', :eg_version); -- fparks/miker
+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 a7017eb786935223d2a2013d6347d9c31a9bd945
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 888ad57..dde8f4a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -1322,9 +1322,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 5d7c47e..e524142 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4732,18 +4732,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 1eb958dede143e3227b52196dda1f0d05fd0cfcf
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>
    
    Conflicts:
    	Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 5f6073f..888ad57 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -1322,8 +1322,11 @@ 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);
 
-	return $U->storagereq(
-		"open-ils.storage.actor.user.crazy_search", $search_hash, 
+    #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 f6173b4..5d7c47e 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4732,6 +4732,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  |   16 ++++++++++++-
 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, 49 insertions(+), 3 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