Bugzilla – Attachment 135208 Details for
Bug 30730
Holds to Pull should not list items with a notforloan status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30730: Unit tests
Bug-30730-Unit-tests.patch (text/plain), 2.24 KB, created by
Martin Renvoize (ashimema)
on 2022-05-19 15:29:23 UTC
(
hide
)
Description:
Bug 30730: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-05-19 15:29:23 UTC
Size:
2.24 KB
patch
obsolete
>From 3845cfb0956b5b06566fe3ac515e0e16bfafa8ae Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Tue, 17 May 2022 11:37:21 -0400 >Subject: [PATCH] Bug 30730: Unit tests > >Added an entry in holds for an item with negative notforloan value to >test if get_items_that_can_fill returns the right items. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Koha/Holds.t | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Holds.t b/t/db_dependent/Koha/Holds.t >index 36040cbb3b..d9f8b666a7 100755 >--- a/t/db_dependent/Koha/Holds.t >+++ b/t/db_dependent/Koha/Holds.t >@@ -426,7 +426,7 @@ subtest 'get_items_that_can_fill' => sub { > my $item_5 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, itype => $itype_2->itemtype } ); > my $lost = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, itemlost => 1 } ); > my $withdrawn = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, withdrawn => 1 } ); >- my $notforloan = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, notforloan => 1 } ); >+ my $notforloan = $builder->build_sample_item( { biblionumber => $biblio->biblionumber, notforloan => -1 } ); > > my $patron_1 = $builder->build_object( { class => 'Koha::Patrons' } ); > my $patron_2 = $builder->build_object( { class => 'Koha::Patrons' } ); >@@ -466,6 +466,15 @@ subtest 'get_items_that_can_fill' => sub { > } > ); > >+ my $notforloan_reserve_id = C4::Reserves::AddReserve( >+ { >+ borrowernumber => $patron_2->borrowernumber, >+ biblionumber => $biblio->biblionumber, >+ priority => 0, >+ itemnumber => $notforloan->itemnumber, >+ } >+ ); >+ > # item 3 is on loan > AddIssue( $patron_3->unblessed, $item_3->barcode ); > >@@ -483,7 +492,7 @@ subtest 'get_items_that_can_fill' => sub { > > $holds = Koha::Holds->search( > { >- reserve_id => [ $reserve_id_1, $reserve_id_2, $waiting_reserve_id, ] >+ reserve_id => [ $reserve_id_1, $reserve_id_2, $waiting_reserve_id, $notforloan_reserve_id, ] > } > ); > >-- >2.20.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 30730
:
135074
|
135075
|
135081
|
135082
|
135207
|
135208
|
135209
|
135210
|
135211
|
135212