Bugzilla – Attachment 98288 Details for
Bug 24440
Add ->current_item_level_holds to Koha::Acquisition::Order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24440: Rename current_holds with current_item_level_holds
Bug-24440-Rename-currentholds-with-currentitemleve.patch (text/plain), 2.62 KB, created by
Jonathan Druart
on 2020-02-03 12:37:48 UTC
(
hide
)
Description:
Bug 24440: Rename current_holds with current_item_level_holds
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-03 12:37:48 UTC
Size:
2.62 KB
patch
obsolete
>From b2971917e0fd4148e12b750f8d185c8f0f4bcf7d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 3 Feb 2020 13:36:54 +0100 >Subject: [PATCH] Bug 24440: Rename current_holds with current_item_level_holds > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Acquisition/Order.pm | 8 ++++---- > t/db_dependent/Koha/Acquisition/Order.t | 8 ++++---- > 2 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm >index 55d720fcc4..e553386652 100644 >--- a/Koha/Acquisition/Order.pm >+++ b/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<Koha::Holds> >+Returns the current item-level holds associated to the order. It returns a I<Koha::Holds> > resultset in scalar context or a list of I<Koha::Hold> objects in list context. > > It returns B<undef> if no I<biblio> or no I<items> are linked to the order. > > =cut > >-sub current_holds { >+sub current_item_level_holds { > my ($self) = @_; > > my $items_rs = $self->_result->aqorders_items; >diff --git a/t/db_dependent/Koha/Acquisition/Order.t b/t/db_dependent/Koha/Acquisition/Order.t >index 77476eb228..5d2a1bd5ca 100644 >--- a/t/db_dependent/Koha/Acquisition/Order.t >+++ b/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; > }; >-- >2.11.0
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 24440
:
97467
|
97468
|
97491
|
97492
|
98194
|
98195
|
98196
|
98197
|
98205
|
98206
|
98207
|
98208
|
98237
|
98283
|
98284
|
98285
|
98286
|
98287
| 98288