From 56b86cf35ab97845dbdaf200f9d36851e44ac787 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' Signed-off-by: Jonathan Druart --- 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 0b346217e9..c73a298f54 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1172,15 +1172,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; @@ -1229,7 +1229,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.39.5