[open-ils-commits] r16020 - in branches/rel_1_6_0/Open-ILS: src/perlmods/OpenILS/Application/Circ src/sql/Pg web/opac/locale/en-US xul/staff_client/server/admin (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Mar 27 13:35:52 EDT 2010


Author: miker
Date: 2010-03-27 13:35:48 -0400 (Sat, 27 Mar 2010)
New Revision: 16020

Modified:
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
   branches/rel_1_6_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql
   branches/rel_1_6_0/Open-ILS/web/opac/locale/en-US/lang.dtd
   branches/rel_1_6_0/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml
Log:
Patch from Dan Wells which allows restriction of renewal when the item in question is needed to fulfill a hold. 

There was concern initially about whether a patrons own holds should be ignored, but that is not the case in scripted circ rules, so the behavior, as implemented by Dan, is correct. 



Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-03-27 17:30:40 UTC (rev 16019)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-03-27 17:35:48 UTC (rev 16020)
@@ -2451,6 +2451,14 @@
 
     my $events = [];
 
+    if ($U->ou_ancestor_setting_value($self->circ_lib, 'circ.block_renews_for_holds')) {
+        my ($hold, undef, $retarget) = $holdcode->find_nearest_permitted_hold(
+                $self->editor, $self->copy, $self->editor->requestor, 1 );
+        if ($hold) {
+            push(@$events, 'COPY_NEEDED_FOR_HOLD');
+        }
+    }
+
     if(!$self->legacy_script_support) {
         my $results = $self->run_indb_circ_test;
         unless($self->circ_test_success) {

Modified: branches/rel_1_6_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-03-27 17:30:40 UTC (rev 16019)
+++ branches/rel_1_6_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-03-27 17:35:48 UTC (rev 16020)
@@ -1380,6 +1380,7 @@
 INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.cat.bib.keep_on_empty');
 INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.cat.bib.alert_on_empty');
 INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.patron.password.use_phone');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.block_renews_for_holds');
 
 INSERT INTO permission.grp_tree (id, name, parent, description, perm_interval, usergroup, application_perm) VALUES
 	(1, oils_i18n_gettext(1, 'Users', 'pgt', 'name'), NULL, NULL, '3 years', FALSE, 'group_application.user');

Modified: branches/rel_1_6_0/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- branches/rel_1_6_0/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-03-27 17:30:40 UTC (rev 16019)
+++ branches/rel_1_6_0/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-03-27 17:35:48 UTC (rev 16020)
@@ -1600,6 +1600,8 @@
 <!ENTITY staff.server.admin.org_settings.circ.reshelving_complete.interval.desc 'Amount of time to wait before changing an item from "reshelving" status to "available".  Examples "1 day", "6 hours"'>
 <!ENTITY staff.server.admin.org_settings.circ.hold_estimate_wait_interval "Holds: Estimated Wait (Days)">
 <!ENTITY staff.server.admin.org_settings.circ.hold_estimate_wait_interval.desc "When predicting the amount of time a patron will be waiting for a hold to be fulfilled,this is the default/average number of days to assume an item will be checked out.">
+<!ENTITY staff.server.admin.org_settings.circ.block_renews_for_holds "Holds: Block Renewal on Items Needed for Holds">
+<!ENTITY staff.server.admin.org_settings.circ.block_renews_for_holds.desc "When an item could fulfill a hold, do not allow the current patron to renew">
 <!ENTITY staff.server.admin.org_settings.circ.selfcheck.patron_login_timeout "Selfcheck: Patron Login Timeout (in seconds)">
 <!ENTITY staff.server.admin.org_settings.circ.selfcheck.patron_login_timeout.desc "Number of seconds of inactivity before the patron is logged out of the selfcheck interface">
 <!ENTITY staff.server.admin.org_settings.circ.selfcheck.alert_on_checkout_event "Selfcheck: Pop-up alert for errors">

Modified: branches/rel_1_6_0/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml
===================================================================
--- branches/rel_1_6_0/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml	2010-03-27 17:30:40 UTC (rev 16019)
+++ branches/rel_1_6_0/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml	2010-03-27 17:35:48 UTC (rev 16020)
@@ -103,6 +103,11 @@
                     desc : '&staff.server.admin.org_settings.circ.hold_estimate_wait_interval.desc;',
                     type : 'number'
                 },
+                'circ.block_renews_for_holds' : {
+                    label : '&staff.server.admin.org_settings.circ.block_renews_for_holds;',
+                    desc : '&staff.server.admin.org_settings.circ.block_renews_for_holds.desc;',
+                    type : 'bool'
+                },
                 'circ.selfcheck.patron_login_timeout' : {
                     label : '&staff.server.admin.org_settings.circ.selfcheck.patron_login_timeout;',
                     desc : '&staff.server.admin.org_settings.circ.selfcheck.patron_login_timeout.desc;',



More information about the open-ils-commits mailing list