Patch from Dan Wells which allows restriction of renewal when the item in question...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 27 Mar 2010 17:40:51 +0000 (17:40 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 27 Mar 2010 17:40:51 +0000 (17:40 +0000)
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.

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@16021 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml

index 78b74b5..8814970 100644 (file)
@@ -2948,6 +2948,14 @@ sub run_renew_permit {
 
     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) {
index 21b1f0b..f4473a5 100644 (file)
@@ -1392,6 +1392,7 @@ INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.global.
 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');
 
 SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
 
index 75c6f19..768be31 100644 (file)
 <!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">
index eadba00..9a4df7b 100644 (file)
                     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;',