From 4791a83457e2576bba12ce47051c303d964ffb85 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 22 Jul 2021 09:56:49 +0100 Subject: [PATCH] Bug 22690: (QA follow-up) Rename 'item_orders' to 'orders' --- Koha/Item.pm | 8 ++++---- t/db_dependent/Koha/Item.t | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 6722dcfb7c..fb177928ed 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1173,15 +1173,15 @@ sub itemtype { return Koha::ItemTypes->find( $self->effective_itemtype ); } -=head3 item_orders +=head3 orders -my $orders = $item->item_orders(); + my $orders = $item->orders(); Returns a Koha::Acquisition::Orders object =cut -sub item_orders { +sub orders { my ( $self ) = @_; my $orders = $self->_result->item_orders; @@ -1230,7 +1230,7 @@ sub move_to_biblio { } # Acquisition orders - my $orders = $self->item_orders; + my $orders = $self->orders; if ($orders) { $orders->update({ biblionumber => $to_biblionumber }, { no_triggers => 1 }); } diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t index 18dcca46a2..d03a60a30a 100755 --- a/t/db_dependent/Koha/Item.t +++ b/t/db_dependent/Koha/Item.t @@ -856,7 +856,7 @@ subtest 'Tests for relationship between item and item_orders via aqorders_item' }, }); - my $orders = $item->item_orders; + my $orders = $item->orders; is ($orders->count, 1, 'One order found by item with the relationship'); is ($orders->next->order_internalnote, $order_note, 'Correct order found by item with the relationship'); }; -- 2.20.1