Bugzilla – Attachment 70425 Details for
Bug 18856
Cancel Waiting Hold in OPAC does not give useful message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18856 [QA Followup] - Rename method to avoid confusion
Bug-18856-QA-Followup---Rename-method-to-avoid-con.patch (text/plain), 4.38 KB, created by
Kyle M Hall (khall)
on 2018-01-11 14:44:53 UTC
(
hide
)
Description:
Bug 18856 [QA Followup] - Rename method to avoid confusion
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-01-11 14:44:53 UTC
Size:
4.38 KB
patch
obsolete
>From 4b6c876813cd9da0846285f9d9eec42c69a5fb1d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatetsolutions.com> >Date: Thu, 11 Jan 2018 09:44:08 -0500 >Subject: [PATCH] Bug 18856 [QA Followup] - Rename method to avoid confusion > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Hold.pm | 6 +++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 +++--- > t/db_dependent/Hold.t | 8 ++++---- > 3 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 0368a42..27ff819 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -224,17 +224,17 @@ sub is_in_transit { > return $self->found() eq 'T'; > } > >-=head3 is_cancelable >+=head3 is_cancelable_from_opac > > Returns true if hold is a cancelable hold > >-Holds may be only canceled if they are found. >+Holds may be only canceled if they are not found. > > This is used from the OPAC. > > =cut > >-sub is_cancelable { >+sub is_cancelable_from_opac { > my ($self) = @_; > > return 1 unless $self->is_found(); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 35cf5a0..859468f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -695,7 +695,7 @@ Using this account is not recommended because some parts of Koha will not functi > </td> > [% IF SuspendHoldsOpac %] > <td> >- [% IF ( RESERVE.is_cancelable ) %] >+ [% IF ( RESERVE.is_cancelable_from_opac ) %] > [% IF RESERVE.suspend %] > <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> > <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" /> >@@ -736,11 +736,11 @@ Using this account is not recommended because some parts of Koha will not functi > </form> > [% END # / IF AutoResumeSuspendedHolds %] > [% END # / IF RESERVE.suspend %] >- [% END # / IF ( RESERVE.is_cancelable )%] >+ [% END # / IF ( RESERVE.is_cancelable_from_opac )%] > </td> > [% END # / IF SuspendHoldsOpac %] > <td class="modify"> >- [% IF ( RESERVE.is_cancelable ) %] >+ [% IF ( RESERVE.is_cancelable_from_opac ) %] > <form action="/cgi-bin/koha/opac-modrequest.pl" method="post"> > <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" /> > <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" /> >diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t >index 8078f2a..3be121e 100755 >--- a/t/db_dependent/Hold.t >+++ b/t/db_dependent/Hold.t >@@ -121,13 +121,13 @@ isnt( $hold->is_waiting, 1, 'The hold is not waiting (W)' ); > is( $hold->is_found, 0, 'The hold is not found' ); > ok( !$hold->is_in_transit, 'The hold is not in transit' ); > >-# Test method is_cancelable >+# Test method is_cancelable_from_opac > $hold->found(undef); >-is( $hold->is_cancelable, 1, "Unfound hold is cancelable" ); >+is( $hold->is_cancelable_from_opac, 1, "Unfound hold is cancelable" ); > $hold->found('W'); >-is( $hold->is_cancelable, 0, "Waiting hold is not cancelable" ); >+is( $hold->is_cancelable_from_opac, 0, "Waiting hold is not cancelable" ); > $hold->found('T'); >-is( $hold->is_cancelable, 0, "In transit hold is not cancelable" ); >+is( $hold->is_cancelable_from_opac, 0, "In transit hold is not cancelable" ); > > # Test method is_at_destination > $hold->found(undef); >-- >2.10.2
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 18856
:
67480
|
67520
|
69077
|
70294
|
70398
|
70399
|
70419
|
70424
|
70425
|
75394
|
75395