@@ -, +, @@ indicate it is for SIP-based checkouts only --- C4/Items.pm | 4 ++-- C4/SIP/ILS/Transaction/Checkout.pm | 2 +- C4/UsageStats.pm | 2 +- Koha/Item.pm | 2 +- installer/data/mysql/atomicupdate/bug_23233.perl | 12 ++++++++++++ installer/data/mysql/sysprefs.sql | 2 +- .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++-- 7 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_23233.perl --- a/C4/Items.pm +++ a/C4/Items.pm @@ -950,7 +950,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 @@ -964,7 +964,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' --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ a/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 --- a/C4/UsageStats.pm +++ a/C4/UsageStats.pm @@ -134,7 +134,7 @@ sub BuildReport { AgeRestrictionOverride AllFinesNeedOverride AllowFineOverride - AllowItemsOnHoldCheckout + AllowItemsOnHoldCheckoutSIP AllowItemsOnHoldCheckoutSCO AllowNotForLoanOverride AllowRenewalLimitOverride --- a/Koha/Item.pm +++ a/Koha/Item.pm @@ -382,7 +382,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; } =head3 as_marc_field --- a/installer/data/mysql/atomicupdate/bug_23233.perl +++ a/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"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/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'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -202,11 +202,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: --