diff --git a/C4/Items.pm b/C4/Items.pm index 05612665fe..85f7908e66 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -944,7 +944,7 @@ sub GetItemsInfo { holding.opac_info as holding_branch_opac_info, home.opac_info as home_branch_opac_info "; - $query .= ",IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold" if !C4::Context->preference('AllowItemsOnHoldCheckout'); + $query .= ",IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP'); $query .= " FROM items LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode @@ -958,7 +958,7 @@ sub GetItemsInfo { LEFT JOIN itemtypes ON itemtypes.itemtype = " . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); $query .= " - LEFT JOIN tmp_holdsqueue USING (itemnumber)" if !C4::Context->preference('AllowItemsOnHoldCheckout'); + LEFT JOIN tmp_holdsqueue USING (itemnumber)" if !C4::Context->preference('AllowItemsOnHoldCheckoutSIP'); $query .= q| LEFT JOIN localization ON itemtypes.itemtype = localization.code AND localization.entity = 'itemtypes' diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm index 91a22be192..e7439742dc 100644 --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ b/C4/SIP/ILS/Transaction/Checkout.pm @@ -57,7 +57,7 @@ sub do_checkout { my $borrower = $patron->unblessed; $debug and warn "do_checkout borrower: . " . Dumper $borrower; my ($issuingimpossible, $needsconfirmation) = _can_we_issue($patron, $barcode, - C4::Context->preference("AllowItemsOnHoldCheckout") + C4::Context->preference("AllowItemsOnHoldCheckoutSIP") ); my $noerror=1; # If set to zero we block the issue diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm index f205767273..f8e0885149 100644 --- a/C4/UsageStats.pm +++ b/C4/UsageStats.pm @@ -134,7 +134,7 @@ sub BuildReport { AgeRestrictionOverride AllFinesNeedOverride AllowFineOverride - AllowItemsOnHoldCheckout + AllowItemsOnHoldCheckoutSIP AllowItemsOnHoldCheckoutSCO AllowNotForLoanOverride AllowRenewalLimitOverride diff --git a/Koha/Item.pm b/Koha/Item.pm index 4bd3ba2d1c..55ab9b90b8 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -365,7 +365,7 @@ This method checks the tmp_holdsqueue to see if this item has been selected for sub has_pending_hold { my ( $self ) = @_; my $pending_hold = $self->_result->tmp_holdsqueues; - return !C4::Context->preference('AllowItemsOnHoldCheckout') && $pending_hold->count ? 1: 0; + return !C4::Context->preference('AllowItemsOnHoldCheckoutSIP') && $pending_hold->count ? 1: 0; } =head2 Internal methods diff --git a/installer/data/mysql/atomicupdate/bug_23233.perl b/installer/data/mysql/atomicupdate/bug_23233.perl new file mode 100644 index 0000000000..409b219692 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23233.perl @@ -0,0 +1,12 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + UPDATE systempreferences SET + variable = 'AllowItemsOnHoldCheckoutSIP', + explanation = 'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else via SIP. This allows self checkouts for those items.' + WHERE variable = 'AllowItemsOnHoldCheckout' + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index aeab5d18f0..d32fdbe455 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -27,7 +27,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AllowHoldsOnDamagedItems','1','','Allow hold requests to be placed on damaged items','YesNo'), ('AllowHoldsOnPatronsPossessions','1',NULL,'Allow holds on records that patron have items of it','YesNo'), ('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'), -('AllowItemsOnHoldCheckout','0','','Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'), +('AllowItemsOnHoldCheckoutSIP','0','','Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else via SIP. This allows self checkouts for those items.','YesNo'), ('AllowItemsOnHoldCheckoutSCO','0','','Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'), ('AllowMultipleCovers','0','1','Allow multiple cover images to be attached to each bibliographic record.','YesNo'), ('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 63784bc16f..8f7bcf7623 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -204,11 +204,13 @@ Circulation: no: "Don't allow" - staff to renew items that are on hold by manually specifying a due date. - - - pref: AllowItemsOnHoldCheckout + - pref: AllowItemsOnHoldCheckoutSIP choices: yes: Allow no: "Don't allow" - - checkouts of items reserved to someone else. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items. If using the holds queue items with pending holds will be marked as "unavailable" if this set to "Don't Allow". + - checkouts of items reserved to someone else via SIP checkout messages. + - If allowed do not generate RESERVE_WAITING and RESERVED warning. + - This allows self checkouts for those items. If using the holds queue items with pending holds will be marked as "unavailable" if this set to "Don't Allow". - - pref: AllowItemsOnHoldCheckoutSCO choices: