@@ -, +, @@ --- Koha/Acquisition/Order.pm | 8 ++++---- t/db_dependent/Koha/Acquisition/Order.t | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) --- a/Koha/Acquisition/Order.pm +++ a/Koha/Acquisition/Order.pm @@ -177,18 +177,18 @@ sub subscription { return Koha::Subscription->_new_from_dbic( $subscription_rs ); } -=head3 current_holds +=head3 current_item_level_holds - my $holds = $order->current_holds; + my $holds = $order->current_item_level_holds; -Returns the current holds associated to the order. It returns a I +Returns the current item-level holds associated to the order. It returns a I resultset in scalar context or a list of I objects in list context. It returns B if no I or no I are linked to the order. =cut -sub current_holds { +sub current_item_level_holds { my ($self) = @_; my $items_rs = $self->_result->aqorders_items; --- a/t/db_dependent/Koha/Acquisition/Order.t +++ a/t/db_dependent/Koha/Acquisition/Order.t @@ -283,7 +283,7 @@ subtest 'duplicate_to | add_item' => sub { $schema->storage->txn_rollback; }; -subtest 'current_holds() tests' => sub { +subtest 'current_item_level_holds() tests' => sub { plan tests => 3; @@ -328,16 +328,16 @@ subtest 'current_holds() tests' => sub { } ); - is( $order->current_holds, undef, 'Returns undef if no linked biblio'); + is( $order->current_item_level_holds, undef, 'Returns undef if no linked biblio'); $order->set({ biblionumber => $biblio->biblionumber })->store->discard_changes; - is( $order->current_holds, undef, 'Returns undef if no linked items'); + is( $order->current_item_level_holds, undef, 'Returns undef if no linked items'); $order->add_item( $item_2->itemnumber ); $order->add_item( $item_3->itemnumber ); - is( $order->current_holds->count, 1, 'Only current (not future) holds are returned'); + is( $order->current_item_level_holds->count, 1, 'Only current (not future) holds are returned'); $schema->storage->txn_rollback; }; --