Bugzilla – Attachment 75689 Details for
Bug 19945
ILSDI - Return the reason a reserve is impossible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19945: (follow-up) optimization and test correction
Bug-19945-follow-up-optimization-and-test-correcti.patch (text/plain), 1.88 KB, created by
Jonathan Druart
on 2018-05-30 19:06:19 UTC
(
hide
)
Description:
Bug 19945: (follow-up) optimization and test correction
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-05-30 19:06:19 UTC
Size:
1.88 KB
patch
obsolete
>From 50233b6c103522b5b897387111f2ef4a7171b560 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 27 Mar 2018 19:31:36 +0000 >Subject: [PATCH] Bug 19945: (follow-up) optimization and test correction > >The double call to CanItemBeReserved was pointless in >the C4/Reserves.pm HoldItem, as CanBookBeReserved calls >CanItemBeReserved and even returns that code. > >Additionally, the tests failed, because there were 5 >tests not 4. > >TEST PLAN >---------- >prove t/db_dependent/ILSDI_Services.t >run koha qa test tools > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/ILSDI/Services.pm | 3 +-- > t/db_dependent/ILSDI_Services.t | 2 +- > 2 files changed, 2 insertions(+), 3 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index f30b081d5f..f1ad047a39 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -740,9 +740,8 @@ sub HoldItem { > return { code => 'RecordNotFound' } if $$item{biblionumber} ne $biblio->biblionumber; > > # Check for item disponibility >- my $canitembereserved = C4::Reserves::CanItemBeReserved( $borrowernumber, $itemnumber ); >+ # CanItemBeReserved codes are passed back too. > my $canbookbereserved = C4::Reserves::CanBookBeReserved( $borrowernumber, $biblionumber ); >- return { code => $canitembereserved } unless $canitembereserved eq 'OK'; > return { code => $canbookbereserved } unless $canbookbereserved eq 'OK'; > > # Pickup branch management >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index 0b27bd093a..9d8a737e71 100644 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -19,7 +19,7 @@ use Modern::Perl; > > use CGI qw ( -utf8 ); > >-use Test::More tests => 4; >+use Test::More tests => 5; > use Test::MockModule; > use t::lib::Mocks; > use t::lib::TestBuilder; >-- >2.11.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 19945
:
70409
|
73351
|
73352
|
75688
|
75689
|
79046
|
79047
|
79048
|
79049
|
81371
|
81372
|
81373
|
81374
|
83745
|
83746
|
83747
|
83748