Bugzilla – Attachment 83752 Details for
Bug 21738
[ILS-DI] Error placing a hold on a title without item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21738: check items count in C4:ILSDI::HoldTitle
Bug-21738-check-items-count-in-C4ILSDIHoldTitle.patch (text/plain), 1.38 KB, created by
Kyle M Hall (khall)
on 2019-01-09 15:15:36 UTC
(
hide
)
Description:
Bug 21738: check items count in C4:ILSDI::HoldTitle
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-01-09 15:15:36 UTC
Size:
1.38 KB
patch
obsolete
>From 0537001f40a1bf900caa72cec9bfe65fec5e779e Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Tue, 13 Nov 2018 09:44:51 +0100 >Subject: [PATCH] Bug 21738: check items count in C4:ILSDI::HoldTitle > >Test plan: > - Try holding a title without items via ILS-DI > (cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1), > - you get an error, > - apply this patch, > - try again, > - you should get the code "Notitems"Bug 21738: check items count in > C4:ILSDI::HoldTitle > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/ILSDI/Services.pm | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 89b8dab42c..1ffdc14419 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -660,6 +660,18 @@ sub HoldTitle { > my $biblio = Koha::Biblios->find( $biblionumber ); > return { code => 'RecordNotFound' } unless $biblio; > >+ my @hostitems = get_hostitemnumbers_of($biblionumber); >+ my @itemnumbers; >+ if (@hostitems){ >+ push(@itemnumbers, @hostitems); >+ } >+ >+ my $items = Koha::Items->search({ -or => { biblionumber => $biblionumber, itemnumber => { in => \@itemnumbers } } }); >+ >+ unless ( $items->count ) { >+ return { code => 'NoItems' }; >+ } >+ > my $title = $biblio ? $biblio->title : ''; > > # Check if the biblio can be reserved >-- >2.17.2 (Apple Git-113)
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 21738
:
81754
|
82251
|
83637
|
83752
|
83753
|
84673
|
84674
|
84853