Bugzilla – Attachment 158688 Details for
Bug 18317
Allow check out of already checked out items through SIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18317: Allow check out of already checked out items through SIP
Bug-18317-Allow-check-out-of-already-checked-out-i.patch (text/plain), 5.47 KB, created by
David Cook
on 2023-11-09 02:05:33 UTC
(
hide
)
Description:
Bug 18317: Allow check out of already checked out items through SIP
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-11-09 02:05:33 UTC
Size:
5.47 KB
patch
obsolete
>From a80465bd89ee2981c8548b55b976a62aadf43af0 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 19 Jul 2021 04:16:44 +0000 >Subject: [PATCH] Bug 18317: Allow check out of already checked out items > through SIP > >This patch allows checkouts to be processed via SIP even when >the item is already checked out to a user. > >Test plan: >0) Apply the patch >1) koha-sip --stop kohadev >2) koha-sip --start kohadev >3) misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkout --patron koha --item 39999000001310 >4) misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkout --patron 23529000035676 --item 39999000001310 >5) Note the output includes "AFItem checked out to another patron" >6) Enable system preference "AllowItemsOnLoanCheckoutSIP" >7) misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkout --patron 23529000035676 --item 39999000001310 >8) Note the output no longer includes "AFItem checked out to another patron" and the item has been checked out to patron 23529000035676 >--- > C4/SIP/ILS.pm | 3 +++ > C4/SIP/ILS/Transaction/Checkout.pm | 4 +++- > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 8 ++++++++ > 4 files changed, 15 insertions(+), 1 deletion(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 2184f13e1b..4b75e324a7 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -20,6 +20,8 @@ use C4::SIP::ILS::Transaction::Hold; > use C4::SIP::ILS::Transaction::Renew; > use C4::SIP::ILS::Transaction::RenewAll; > >+use C4::Context; #BZ 18317 >+ > my %supports = ( > 'magnetic media' => 1, > 'security inhibit' => 0, >@@ -161,6 +163,7 @@ sub checkout { > $circ->screen_msg("Invalid Item"); > } > elsif ( $item->{borrowernumber} >+ && ! C4::Context->preference('AllowItemsOnLoanCheckoutSIP') #BZ 18317 > && !_ci_cardnumber_cmp( $item->{borrowernumber}, $patron->borrowernumber ) ) > { > $circ->screen_msg("Item checked out to another patron"); >diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm >index c13e568260..40165a9e53 100644 >--- a/C4/SIP/ILS/Transaction/Checkout.pm >+++ b/C4/SIP/ILS/Transaction/Checkout.pm >@@ -88,7 +88,9 @@ sub do_checkout { > { > $self->screen_msg("Item is on hold for another patron."); > $noerror = 0; >- } elsif ( $confirmation eq 'ISSUED_TO_ANOTHER' ) { >+ } elsif ($confirmation eq 'ISSUED_TO_ANOTHER' and C4::Context->preference("AllowItemsOnLoanCheckoutSIP")) { #BZ 18317 >+ next; >+ } elsif ($confirmation eq 'ISSUED_TO_ANOTHER' and ! C4::Context->preference("AllowItemsOnLoanCheckoutSIP")) { #BZ 18317 > $self->screen_msg("Item already checked out to another patron. Please return item for check-in."); > $noerror = 0; > last; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 3e6715120d..91ffe171be 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -34,6 +34,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('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'), > ('AllowItemsOnHoldCheckoutSIP','0','','Do not generate RESERVED warning when checking out items reserved to someone else via SIP. This allows self checkouts for those items.','YesNo'), >+('AllowItemsOnLoanCheckoutSIP','0','','Do not generate ISSUED_TO_ANOTHER warning when checking out items already checked out 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 4031baa4d0..e85e80fb87 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 >@@ -220,6 +220,14 @@ Circulation: > - checkouts of items reserved to someone else via SIP checkout messages. > - If allowed do not generate 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: AllowItemsOnLoanCheckoutSIP >+ choices: >+ 1: Allow >+ 0: "Don't allow" >+ - checkouts of items already checked out to someone else via SIP checkout messages. >+ - If allowed do not generate ISSUED_TO_ANOTHER warning. >+ - This allows self checkouts for those items. > - > - pref: AllowItemsOnHoldCheckoutSCO > choices: >-- >2.30.2
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 18317
:
122934
|
158688
|
158689
|
159130
|
159131
|
162394
|
162395
|
162396
|
165972
|
168489
|
168490
|
168491
|
168492
|
168493