Bugzilla – Attachment 27346 Details for
Bug 11518
Add new method to Koha::Schema::Result::Item that will always return the correct itemtype
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11518 [Followup] - Change method name from 'itemtype' to 'effective_itemtype' for clarity
PASSED-QA-Bug-11518-Followup---Change-method-name-.patch (text/plain), 1.85 KB, created by
Katrin Fischer
on 2014-04-21 12:40:17 UTC
(
hide
)
Description:
[PASSED QA] Bug 11518 [Followup] - Change method name from 'itemtype' to 'effective_itemtype' for clarity
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-21 12:40:17 UTC
Size:
1.85 KB
patch
obsolete
>From d669235355f2cad52d57ce1186f84ed53bd829da Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 10 Jan 2014 10:21:55 -0500 >Subject: [PATCH] [PASSED QA] Bug 11518 [Followup] - Change method name from > 'itemtype' to 'effective_itemtype' for clarity > >Test runs without errors. > >Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > Koha/Schema/Result/Item.pm | 2 +- > t/db_dependent/Items.t | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index 656de69..6a1e0d2 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -625,7 +625,7 @@ __PACKAGE__->belongs_to( > ); > > use C4::Context; >-sub itemtype { >+sub effective_itemtype { > my ( $self ) = @_; > > if ( C4::Context->preference('item-level_itypes') ) { >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index a4bdd1c..af7b252 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -170,10 +170,10 @@ subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub { > my ( $item ) = $biblioitem->items(); > > C4::Context->set_preference( 'item-level_itypes', 0 ); >- ok( $item->itemtype() eq 'BIB_LEVEL', '$item->itemtype() returns biblioitem.itemtype when item-level_itypes is disabled' ); >+ ok( $item->effective_itemtype() eq 'BIB_LEVEL', '$item->itemtype() returns biblioitem.itemtype when item-level_itypes is disabled' ); > > C4::Context->set_preference( 'item-level_itypes', 1 ); >- ok( $item->itemtype() eq 'ITEM_LEVEL', '$item->itemtype() returns items.itype when item-level_itypes is disabled' ); >+ ok( $item->effective_itemtype() eq 'ITEM_LEVEL', '$item->itemtype() returns items.itype when item-level_itypes is disabled' ); > > > $dbh->rollback; >-- >1.8.3.2
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 11518
:
24121
|
24143
|
25448
|
25510
|
26983
|
26985
|
26987
|
27343
|
27344
|
27345
| 27346 |
27347
|
27348
|
29544
|
31240
|
31241
|
31242