Bugzilla – Attachment 113824 Details for
Bug 27058
Cannot place hold to ordered item when on shelf holds are not allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27058: Add test to show ordered items cannot be checked out
Bug-27058-Add-test-to-show-ordered-items-cannot-be.patch (text/plain), 2.19 KB, created by
Joonas Kylmälä
on 2020-11-19 15:59:12 UTC
(
hide
)
Description:
Bug 27058: Add test to show ordered items cannot be checked out
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2020-11-19 15:59:12 UTC
Size:
2.19 KB
patch
obsolete
>From ff239521ec2d43c2c8e740bc8afbff71386a4f71 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Thu, 19 Nov 2020 17:13:25 +0200 >Subject: [PATCH] Bug 27058: Add test to show ordered items cannot be checked > out > >--- > .../Holds/DisallowHoldIfItemsAvailable.t | 35 +++++++++++++++++++++- > 1 file changed, 34 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t b/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t >index a815713d43..021ff8ffd8 100755 >--- a/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t >+++ b/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t >@@ -8,7 +8,7 @@ use C4::Items; > use Koha::Items; > use Koha::CirculationRules; > >-use Test::More tests => 11; >+use Test::More tests => 12; > > use t::lib::TestBuilder; > use t::lib::Mocks; >@@ -393,6 +393,39 @@ subtest 'Check holds availability with different item types' => sub { > is( $is, 1, "Item5 can be requested to hold, 2 items, Item4 checked out, Item5 restricted" ); > }; > >+subtest 'Check item checkout availability with ordered item' => sub { >+ plan tests => 1; >+ >+ my $biblio2 = $builder->build_sample_biblio( { itemtype => $itemtype } ); >+ my $biblionumber1 = $biblio2->biblionumber; >+ my $item1 = $builder->build_sample_item( >+ { biblionumber => $biblionumber1, >+ itype => $itemtype2, >+ homebranch => $library_A, >+ holdingbranch => $library_A, >+ notforloan => -1 >+ } >+ ); >+ >+ $dbh->do("DELETE FROM circulation_rules"); >+ Koha::CirculationRules->set_rules( >+ { categorycode => undef, >+ itemtype => $itemtype, >+ branchcode => undef, >+ rules => { >+ issuelength => 7, >+ lengthunit => 8, >+ reservesallowed => 99, >+ holds_per_record => 99, >+ onshelfholds => 2, >+ } >+ } >+ ); >+ >+ $is = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblionumber1, patron => $patron1 } ); >+ is( $is, 0, "Ordered item cannot be checked out" ); >+}; >+ > # Cleanup > $schema->storage->txn_rollback; > >-- >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 27058
:
113820
|
113821
|
113822
|
113824
|
113825
|
114203
|
114204
|
114210
|
114211
|
117021
|
117780
|
117781
|
117782
|
117855
|
117864
|
117865