Bugzilla – Attachment 70457 Details for
Bug 4319
waiting and in transit items cannot be reserved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4319 - [QA follow-up] Rename hasItemswaitingOrInTransit to has_items_waiting_or_intransit and update pod
Bug-4319---QA-follow-up-Rename-hasItemswaitingOrIn.patch (text/plain), 3.93 KB, created by
Alex Arnaud
on 2018-01-12 09:52:30 UTC
(
hide
)
Description:
Bug 4319 - [QA follow-up] Rename hasItemswaitingOrInTransit to has_items_waiting_or_intransit and update pod
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2018-01-12 09:52:30 UTC
Size:
3.93 KB
patch
obsolete
>From 51837ea5ff6228d645a43b3a5a6d25134a4303ab Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Fri, 12 Jan 2018 09:51:45 +0000 >Subject: [PATCH] Bug 4319 - [QA follow-up] Rename hasItemswaitingOrInTransit > to has_items_waiting_or_intransit and update pod > >--- > Koha/Biblio.pm | 8 ++++++-- > opac/opac-ISBDdetail.pl | 2 +- > opac/opac-MARCdetail.pl | 2 +- > opac/opac-detail.pl | 2 +- > t/db_dependent/Koha/Biblios.t | 8 ++++---- > 5 files changed, 13 insertions(+), 9 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 9a4937d..a35048d 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -318,11 +318,15 @@ sub subscriptions { > return $self->{_subscriptions}; > } > >-=head3 hasItemswaitingOrInTransit >+=head3 has_items_waiting_or_intransit >+ >+my $itemsWaitingOrInTransit = $biblio->has_items_waiting_or_intransit >+ >+Tells if this bibliographic record has items waiting or in transit. > > =cut > >-sub hasItemswaitingOrInTransit { >+sub has_items_waiting_or_intransit { > my ( $self ) = @_; > > if ( Koha::Holds->search({ biblionumber => $self->id, >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index d9447cc..b4353ba 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -181,7 +181,7 @@ for my $itm (@items) { > unless $allow_onshelf_holds; > } > >-if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) { >+if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { > $template->param( ReservableItems => 1 ); > } > >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 90b2974..609d9d9 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -136,7 +136,7 @@ for my $itm (@all_items) { > last if $allow_onshelf_holds; > } > >-if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) { >+if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { > $template->param( ReservableItems => 1 ); > } > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 9a1177e..ea7d045 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -719,7 +719,7 @@ if ( not $viewallitems and @items > $max_items_to_display ) { > } > } > >-if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) { >+if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_items_waiting_or_intransit ) { > $template->param( ReservableItems => 1 ); > } > >diff --git a/t/db_dependent/Koha/Biblios.t b/t/db_dependent/Koha/Biblios.t >index 9d41531..2f807b1 100644 >--- a/t/db_dependent/Koha/Biblios.t >+++ b/t/db_dependent/Koha/Biblios.t >@@ -100,13 +100,13 @@ subtest 'waiting_or_in_transit' => sub { > $reserve = Koha::Holds->find($reserve->{reserve_id}); > $biblio = Koha::Biblios->find($biblio->{biblionumber}); > >- is($biblio->hasItemswaitingOrInTransit, 0, 'Item is neither waiting nor in transit'); >+ is($biblio->has_items_waiting_or_intransit, 0, 'Item is neither waiting nor in transit'); > > $reserve->found('W')->store; >- is($biblio->hasItemswaitingOrInTransit, 1, 'Item is waiting'); >+ is($biblio->has_items_waiting_or_intransit, 1, 'Item is waiting'); > > $reserve->found('T')->store; >- is($biblio->hasItemswaitingOrInTransit, 1, 'Item is in transit'); >+ is($biblio->has_items_waiting_or_intransit, 1, 'Item is in transit'); > > my $transfer = $builder->build({ > source => 'Branchtransfer', >@@ -117,7 +117,7 @@ subtest 'waiting_or_in_transit' => sub { > }); > my $t = Koha::Database->new()->schema()->resultset( 'Branchtransfer' )->find($transfer->{branchtransfer_id}); > $reserve->found(undef)->store; >- is($biblio->hasItemswaitingOrInTransit, 1, 'Item has transfer'); >+ is($biblio->has_items_waiting_or_intransit, 1, 'Item has transfer'); > }; > > $schema->storage->txn_rollback; >-- >2.7.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 4319
:
3740
|
4099
|
4110
|
4327
|
4329
|
16965
|
67558
|
67584
|
67637
|
67704
|
67970
|
68194
|
68197
|
68198
|
68199
|
68531
|
68782
|
68786
|
69724
|
69725
|
69728
|
69815
|
69816
|
69817
| 70457