Bugzilla – Attachment 156251 Details for
Bug 34153
Add ability to allow items with additional materials notes to be checked out via SIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34153: Add ability to allow items with additional materials notes to be checked out via SIP
Bug-34153-Add-ability-to-allow-items-with-addition.patch (text/plain), 3.60 KB, created by
Victor Grousset/tuxayo
on 2023-09-27 06:06:46 UTC
(
hide
)
Description:
Bug 34153: Add ability to allow items with additional materials notes to be checked out via SIP
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2023-09-27 06:06:46 UTC
Size:
3.60 KB
patch
obsolete
>From 8734bfccbc0529ce75b65dc42546197809d58195 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 29 Jun 2023 08:06:51 -0400 >Subject: [PATCH] Bug 34153: Add ability to allow items with additional > materials notes to be checked out via SIP > >At this time, any item with an additional materials date is blocked from checkout via SIP with a screen message to take the item to a circulation desk for checkout. >Some libraries wish to allow patrons to check out items via SIP even if the item has additional materials. > >Test Plan: >1) Create an item with an additional materials note >2) Attempt to check it out via SIP >3) Note the failure and message >4) Enable the new SIP account option "allow_additional_materials_checkout" >5) Restart the SIP server >6) Attempt the checkout again >7) Note the checkout success and new AF field message! >8) prove t/db_dependent/SIP/Message.t > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > C4/SIP/ILS/Transaction/Checkout.pm | 13 ++++++++++--- > etc/SIPconfig.xml | 1 + > 2 files changed, 11 insertions(+), 3 deletions(-) > >diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm >index f2b6007908..46674f7f9f 100644 >--- a/C4/SIP/ILS/Transaction/Checkout.pm >+++ b/C4/SIP/ILS/Transaction/Checkout.pm >@@ -18,6 +18,7 @@ use C4::Context; > use C4::Circulation qw( AddIssue GetIssuingCharges CanBookBeIssued ProcessOfflineIssue ); > use C4::Members; > use Koha::DateUtils qw( dt_from_string ); >+use Koha::Items; > > use parent qw(C4::SIP::ILS::Transaction); > >@@ -48,6 +49,7 @@ sub do_checkout { > my $patron = Koha::Patrons->find($self->{patron}->{borrowernumber}); > my $overridden_duedate; # usually passed as undef to AddIssue > my $prevcheckout_block_checkout = $account->{prevcheckout_block_checkout}; >+ my $allow_additional_materials_checkout = $account->{allow_additional_materials_checkout}; > my ($issuingimpossible, $needsconfirmation, $messages) = _can_we_issue($patron, $barcode, 0); > > if ( $no_block_due_date ) { >@@ -105,9 +107,14 @@ sub do_checkout { > $noerror = 0 if ($prevcheckout_block_checkout); > last; > } elsif ( $confirmation eq 'ADDITIONAL_MATERIALS' ) { >- $self->screen_msg('Item must be checked out at a circulation desk'); >- $noerror = 0; >- last; >+ if ( $allow_additional_materials_checkout ) { >+ my $item = Koha::Items->find({ barcode => $barcode }); >+ $self->screen_msg( 'Item has additional materials: ' . $item->materials ); >+ } else { >+ $self->screen_msg('Item must be checked out at a circulation desk'); >+ $noerror = 0; >+ last; >+ } > } elsif ( $confirmation eq 'RECALLED' ) { > $self->screen_msg('Item has been recalled for another patron'); > $noerror = 0; >diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml >index 6f131f4ce8..c696c8376e 100644 >--- a/etc/SIPconfig.xml >+++ b/etc/SIPconfig.xml >@@ -70,6 +70,7 @@ > da_field_template="[% patron.surname %][% IF patron.firstname %], [% patron.firstname %][% END %]" > av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" > hide_fields="BD,BE,BF,PB" >+ allow_additional_materials_checkout="1" > register_id='' > holds_block_checkin="0" > holds_get_captured="1" >-- >2.42.0
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 34153
:
152864
|
155740
|
155920
|
155921
|
155927
|
156250
| 156251 |
156252