Bugzilla – Attachment 52921 Details for
Bug 16671
Wrong itemtype picked in HoldsQueue.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16671: (bug 14828 follow-up) Pick the right itemtypes
Bug-16671-bug-14828-follow-up-Pick-the-right-itemt.patch (text/plain), 1.93 KB, created by
Marcel de Rooy
on 2016-06-28 13:40:04 UTC
(
hide
)
Description:
Bug 16671: (bug 14828 follow-up) Pick the right itemtypes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-06-28 13:40:04 UTC
Size:
1.93 KB
patch
obsolete
>From 499f79d0bcb15d57c38a513392df2705a1b98504 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Jun 2016 14:00:56 +0100 >Subject: [PATCH] Bug 16671: (bug 14828 follow-up) Pick the right itemtypes >Content-Type: text/plain; charset=utf-8 > >Looking at commit aafe73eefb5151454fa8957bf188768324d23955 > Bug 14828: Use Koha::ItemType[s] everywhere C4::ItemType was used >-my @item_types = C4::ItemType->all; >-my @for_loan = grep { $_->{notforloan} == 0 } @item_types >- or BAIL_OUT("No adequate itemtype"); >-my $itemtype = $for_loan[0]->{itemtype}; >+my $itemtype = Koha::ItemTypes->search({ notforloan => 1 })->next; >+$itemtype or BAIL_OUT("No adequate itemtype"); #FIXME Should be $itemtype = $itemtype->itemtype > >It seems that the tests expect itemtypes for loan. > >Test plan: > prove t/db_dependent/HoldsQueue.t >should still return green > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised. No qa test tool errors > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Adding follow-up. >--- > t/db_dependent/HoldsQueue.t | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index 135c062..5b1f09e 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -61,8 +61,8 @@ my $borrower_branchcode = $borrower->{branchcode}; > my @branchcodes = ( $library1->{branchcode}, $library2->{branchcode}, $library3->{branchcode} ); > my @other_branches = ( $library2->{branchcode}, $library3->{branchcode} ); > my $least_cost_branch_code = pop @other_branches; >-my $itemtype = Koha::ItemTypes->search({ notforloan => 1 })->next; >-$itemtype or BAIL_OUT("No adequate itemtype"); #FIXME Should be $itemtype = $itemtype->itemtype >+my $itemtype = Koha::ItemTypes->search({ notforloan => 0 })->next->itemtype; >+$itemtype or BAIL_OUT("No adequate itemtype"); > > #Set up the stage > # Sysprefs and cost matrix >-- >1.7.10.4
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 16671
:
52078
|
52096
|
52887
|
52888
| 52921 |
52922
|
52923