Bugzilla – Attachment 176257 Details for
Bug 38505
CirculateILL checkout broken if item does not have a barcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38505: CanBookBeIssued preparation: Appropriate behavior when barcode is falsy
Bug-38505-CanBookBeIssued-preparation-Appropriate-.patch (text/plain), 1.57 KB, created by
Martin Renvoize (ashimema)
on 2025-01-08 16:40:05 UTC
(
hide
)
Description:
Bug 38505: CanBookBeIssued preparation: Appropriate behavior when barcode is falsy
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-01-08 16:40:05 UTC
Size:
1.57 KB
patch
obsolete
>From c9e282de4796deeb939ef32bc70e8d43af878c3e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 21 Nov 2024 14:23:19 -0100 >Subject: [PATCH] Bug 38505: CanBookBeIssued preparation: Appropriate behavior > when barcode is falsy > >Before applying this patch, apply the CanBookBeIssued preparation: tests patch and run that, >Verify it fails, apply this patch. Run that same tests file again. > >----- About this change ----- > >CanBookBeIssued wants to find one item given a barcode. >If a falsy (undef, empty) barcode is supplied, UNKNOWN_BARCODE should be returned. > >Ensure this change does not introduce any regressions: >prove t/db_dependent/Circulation* >prove t/db_dependent/DecreaseLoanHighHolds.t >prove t/db_dependent/rollingloans.t >prove t/db_dependent/api/v1/checkouts.t >prove t/db_dependent/Patron/Borrower_PrevCheckout.t > >Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Circulation.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index b9b66974bec..80cead8a96e 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -780,7 +780,7 @@ sub CanBookBeIssued { > my $onsite_checkout = $params->{onsite_checkout} || 0; > my $override_high_holds = $params->{override_high_holds} || 0; > >- my $item_object = $params->{item} >+ my $item_object = !$barcode ? undef : $params->{item} > // Koha::Items->find( { barcode => $barcode } ); > > # MANDATORY CHECKS - unless item exists, nothing else matters >-- >2.47.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 38505
:
174892
|
174893
|
174894
|
174895
|
174896
|
174924
|
174928
|
174929
|
174930
|
174931
|
174932
|
176256
| 176257 |
176258
|
176259
|
176260