Bugzilla – Attachment 96234 Details for
Bug 23223
Allow requested items to be checked out via SIP2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23223: Add AllowItemsOnHoldCheckoutSIP preference
Bug-23223-Add-AllowItemsOnHoldCheckoutSIP-preferen.patch (text/plain), 5.22 KB, created by
Agustín Moyano
on 2019-12-13 01:13:27 UTC
(
hide
)
Description:
Bug 23223: Add AllowItemsOnHoldCheckoutSIP preference
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2019-12-13 01:13:27 UTC
Size:
5.22 KB
patch
obsolete
>From 48978a6ac59e916f9cb999436732630336db9406 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Thu, 12 Dec 2019 20:22:43 -0300 >Subject: [PATCH] Bug 23223: Add AllowItemsOnHoldCheckoutSIP preference > >This patch adds a new systempreference for behavior for AllowItemsOnHoldCheckout may difer between intranet, SCO and SIP > >To test: >1. apply this patch >2. perl installer/data/mysql/updatedatabase.pl >SUCCESS => There is a new syspref called AllowItemsOnHoldCheckoutSIP >3. configure and start SIPServer >4. with misc/sip_cli_emulator.pl try to checkout an item with a hold >CHECK => checkout is not allowed >5. set AllowItemsOnHoldCheckoutSIP to Allow >6. restart SIPServer >7. repeat step 4 >SUCCESS => checkout is allowed >8. Sign off >--- > C4/SIP/ILS/Transaction/Checkout.pm | 2 +- > .../data/mysql/atomicupdate/bug-23571.perl | 17 +++++++++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../modules/admin/preferences/circulation.pref | 6 ++++++ > 4 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug-23571.perl > >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/installer/data/mysql/atomicupdate/bug-23571.perl b/installer/data/mysql/atomicupdate/bug-23571.perl >new file mode 100644 >index 0000000000..2d8a5c82b6 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-23571.perl >@@ -0,0 +1,17 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ # you can use $dbh here like: >+ $dbh->do(qq{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) >+ VALUES ('AllowItemsOnHoldCheckoutSIP','0','','Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else through SIPServer. This allows self checkouts for those items.','YesNo') >+ }); >+ >+ $dbh->do(qq{ >+ UPDATE systempreferences new, (select value from systempreferences where variable = 'AllowItemsOnHoldCheckout') old >+ SET new.value = old.value >+ WHERE new.variable = 'AllowItemsOnHoldCheckoutSIP' >+ }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23571 - Add AllowItemsOnHoldCheckoutSIP preference)\n"; >+} >\ No newline at end of file >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 9fc3d5821e..c2357afd4c 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -29,6 +29,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('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'), > ('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'), >+('AllowItemsOnHoldCheckoutSIP','0','','Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else through SIPServer. 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'), > ('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','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 e949eac982..5f4414aebf 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 >@@ -213,6 +213,12 @@ Circulation: > yes: Allow > no: "Don't allow" > - checkouts of items reserved to someone else in the SCO module. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items. >+ - >+ - pref: AllowItemsOnHoldCheckoutSIP >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - checkouts of items reserved to someone else through SIPServer. If allowed do not generate RESERVE_WAITING and RESERVED warning. This allows self checkouts for those items. > - > - pref: AllFinesNeedOverride > 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 23223
:
96234
|
96235
|
99957