Bugzilla – Attachment 77222 Details for
Bug 20469
Add item status to staff article requests form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20469: (follow-up) Add Koha::Holds->waiting_or_transit
Bug-20469-follow-up-Add-KohaHolds-waitingortransit.patch (text/plain), 1.94 KB, created by
Marcel de Rooy
on 2018-07-24 14:49:37 UTC
(
hide
)
Description:
Bug 20469: (follow-up) Add Koha::Holds->waiting_or_transit
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-07-24 14:49:37 UTC
Size:
1.94 KB
patch
obsolete
>From 56bb435fbe03a9b3f23040e6b7c11eae1817174c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 24 Jul 2018 15:43:06 +0200 >Subject: [PATCH] Bug 20469: (follow-up) Add Koha::Holds->waiting_or_transit >Content-Type: text/plain; charset=utf-8 > >Adding this variant next to existing ->waiting and ->unfilled methods. >The method will be used in the next patch in Koha::Item. >Trivial unit test added in Holds.t > >Test plan: >Run t/db_dependent/Holds.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Holds.pm | 12 ++++++++++++ > t/db_dependent/Holds.t | 3 ++- > 2 files changed, 14 insertions(+), 1 deletion(-) > >diff --git a/Koha/Holds.pm b/Koha/Holds.pm >index f5da469..3ae9bcb 100644 >--- a/Koha/Holds.pm >+++ b/Koha/Holds.pm >@@ -49,6 +49,18 @@ sub waiting { > return $self->search( { found => 'W' } ); > } > >+=head3 waiting_or_transit >+ >+returns a set of holds that are waiting or in transit >+ >+=cut >+ >+sub waiting_or_transit { >+ my ( $self ) = @_; >+ >+ return $self->search({ found => ['W', 'T'] }); >+} >+ > =head3 unfilled > > returns a set of holds that are unfilled from an existing set >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 93fe745..cc38bc3e 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -7,7 +7,7 @@ use t::lib::TestBuilder; > > use C4::Context; > >-use Test::More tests => 55; >+use Test::More tests => 56; > use MARC::Record; > use C4::Biblio; > use C4::Items; >@@ -120,6 +120,7 @@ ok( $hold_branch == $hold->branch(), "branch method returns stashed branch" ); > my $hold_found = $hold->found(); > $hold->set({ found => 'W'})->store(); > is( Koha::Holds->waiting()->count(), 1, "Koha::Holds->waiting returns waiting holds" ); >+is( Koha::Holds->waiting_or_transit->count, 1, "Koha::Holds->waiting_or_transit returns 1 too" ); > is( Koha::Holds->unfilled()->count(), 4, "Koha::Holds->unfilled returns unfilled holds" ); > > my $patron = Koha::Patrons->find( $borrowernumbers[0] ); >-- >2.1.4
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 20469
:
73281
|
73282
|
73388
|
76627
|
76628
|
76630
|
76631
|
77184
|
77185
|
77186
|
77222
|
77223
|
77224
|
107235
|
107236
|
107412
|
107413
|
107417
|
107418
|
107419
|
108345
|
108346
|
108347