Bugzilla – Attachment 94526 Details for
Bug 23233
AllowItemsOnHoldCheckout is misnamed and should only work for for SIP-based checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23233: AllowItemsOnHoldCheckout is misnamed and does not indicate it is for SIP-based checkouts only
Bug-23233-AllowItemsOnHoldCheckout-is-misnamed-and.patch (text/plain), 8.03 KB, created by
Joonas Kylmälä
on 2019-10-22 11:33:08 UTC
(
hide
)
Description:
Bug 23233: AllowItemsOnHoldCheckout is misnamed and does not indicate it is for SIP-based checkouts only
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2019-10-22 11:33:08 UTC
Size:
8.03 KB
patch
obsolete
>From 994cc1f496c2976a2f787bff98203dbf223e5f61 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 28 Jun 2019 14:07:39 -0400 >Subject: [PATCH] Bug 23233: AllowItemsOnHoldCheckout is misnamed and does not > indicate it is for SIP-based checkouts only >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The system preference AllowItemsOnHoldCheckout only affects SIP based checkouts. I believe we should rename it AllowItemsOnHoldCheckoutSIP so it matches AllowItemsOnHoldCheckoutSCO. We should also update the description as well. > >As far as I know AllowItemsOnHoldCheckout has never affected anything except SIP traffic. That does not preclude the addition of another AllowItemsOnHoldCheckout syspref that would affect the staff interface, but that would be an enhancement and is outside the scope of this bug report. > >Test Plan: >1) Test AllowItemsOnHoldCheckout via SIP >2) Apply this patch >3) Test AllowItemsOnHoldCheckoutSIP via SIP >4) Note there is no difference! >5) Note the syspref description has been update to mention SIP > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > 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 +- > .../en/modules/admin/preferences/circulation.pref | 6 ++++-- > 7 files changed, 22 insertions(+), 8 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_23233.perl > >diff --git a/C4/Items.pm b/C4/Items.pm >index cca700258d..15e4fd94d7 100644 >--- a/C4/Items.pm >+++ b/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' >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 20ab194fc8..0d864af01c 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 2b2eb5fffc..9528bbfd40 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -383,7 +383,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 >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 75b04e2fd0..da096ccfbe 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 9f7c0dcb48..982d7ad6d6 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 >@@ -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: >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23233
:
91114
|
91139
|
91143
|
91144
|
94526
|
94527
|
94528
|
94529
|
94530
|
94531
|
94556
|
94557
|
94558
|
96247
|
96248
|
96249
|
96250
|
96251
|
96252
|
96345
|
96358