Bugzilla – Attachment 86590 Details for
Bug 18450
Renew in header bypasses hold block and renewal limits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18450: Only show Override button for renewals according to relevant sysprefs
Bug-18450-Only-show-Override-button-for-renewals-a.patch (text/plain), 7.33 KB, created by
Hayley Pelham
on 2019-03-14 03:03:34 UTC
(
hide
)
Description:
Bug 18450: Only show Override button for renewals according to relevant sysprefs
Filename:
MIME Type:
Creator:
Hayley Pelham
Created:
2019-03-14 03:03:34 UTC
Size:
7.33 KB
patch
obsolete
>From 0ce638166ea499aa2849d12dcb0a4b6d3029a8cc Mon Sep 17 00:00:00 2001 >From: Hayley Mapley <hayleymapley@catalyst.net.nz> >Date: Thu, 14 Mar 2019 02:26:17 +0000 >Subject: [PATCH] Bug 18450: Only show Override button for renewals according > to relevant sysprefs > >This patch is a follow up which corrects the conditional that uses the system >preferences AllowRenewalIfOtherItemsAvailable and AllowRenewalLimitOverridecontrols >to control the display of the 'Override and renew' button, in addition to the 'Continue >without renewing' button, when renewing an item that has been placed on >hold. This patch also adjusts the expected results for each step in the >test plan outlined in the previous patches to align better with the >system preferences. > >Test plan: > >--NOTE-- The following renewals must be completed in Circulation->Renew > >1) Apply the patch, and ensure the following steps work as described > >2) In More->Administration->Global system preferences ensure that both > the AllowRenewalLimitOverride and AllowRenewalIfOtherItemsAvaliable > preferences are both set to 'Don't allow' > >3) Item Level/Only one available item: > Try to renew an item (with item level hold on it) which belongs to a > biblio with only one item. Note the only button in the yellow message > box displayed is 'Continue without renewing' > >4) Record Level/Only one available item: > Try to renew an item (this time with a 'Next Available' hold on the > record) which belongs to a biblio with only one item. Note the > only button in the yellow message box displayed is 'Continue without > renewing' > >5) Item Level/Multiple available items: > Try to renew an item (with item level hold on it) which belongs to a > biblio with multiple available items of it in the catalogue. Note only > the 'Continue without renewing' button is displayed > >6) Record Level/Multiple available items: > Try to renew an item (this time with a 'Next Available' hold on the > record) which belongs to a biblio with multiple available items > of it in the catalogue. Note only the 'Continue without renewing' button > is displayed > >7) Set both AllowRenewalLimitOverride and > AllowRenewalIfOtherItemsAvaliable system preferences to 'Allow' > >8) Repeat step 3, and note only the 'Continue without renewing' button > is displayed in the yellow message box > >9) Repeat step 4, and note the only button in the yellow message box > displayed is 'Continue without renewing' > >10) Repeat step 5, note only the 'Continue without renewing' button is > displayed (because the hold is for that specific item) > >11) Repeat step 6, note the item is immediately renewed and the > yellow message box is not displayed > >12) Set the AllowRenewalIfOtheritemsAvailable to 'Don't Allow' and > repeat steps 3-6, and note that only the 'Continue without renewing' > button is displayed > >13) Set the AllowRenewalIfOtherItemsAvailable system preference back > to 'Allow' and AllowRenewalLimitOverride syspref to 'Don't Allow', > and repeat steps 3-5 and note only the 'Continue without renewal' > button is displayed. > >14) Repeat step 6 and note that the item is immediately renewed with > no yellow warning box. > >Sponsored-by: Catalyst IT >--- > C4/Circulation.pm | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt | 15 ++++++++++++--- > 2 files changed, 14 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 92d60fdaba..de0b897fc9 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -861,7 +861,7 @@ sub CanBookBeIssued { > $patron->borrowernumber, > $item_object->itemnumber, > ); >- if ( $CanBookBeRenewed == 0 ) { # no more renewals allowed >+ if ( $CanBookBeRenewed == 0 ) { # no more renewals allowed > if ( $renewerror eq 'onsite_checkout' ) { > $issuingimpossible{NO_RENEWAL_FOR_ONSITE_CHECKOUTS} = 1; > } >@@ -2690,7 +2690,7 @@ sub CanBookBeRenewed { > my ( $reserve_found, $reserve, undef ) = > C4::Reserves::CheckReserves( $itemnumber, undef, undef, \@borrowernumbers ); > >- warn $reserve_found; >+ > if ($reserve_found) { > push( @borrowernumbers, $reserve->{borrowernumber} ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >index 581a5894c9..95c90d1c44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >@@ -112,10 +112,9 @@ > > [% ELSIF error == "on_reserve" %] > >- > <p>This item is on hold for another patron.</p> > >- [% IF ((!Koha.Preference('AllowRenewalLimitOverride')) && ((Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) && can_renew == 1) || ((Koha.Preference('AllowRenewalLimitOverride')) && ((Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) && can_renew == 1 )%] >+ <!--[% IF ((!Koha.Preference('AllowRenewalLimitOverride')) && ((Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) && can_renew == 1) || ((Koha.Preference('AllowRenewalLimitOverride')) && ((Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) && can_renew == 1 )%] > <form method="post" action="/cgi-bin/koha/circ/renew.pl"> > <input type="hidden" name="barcode" value="[% item.barcode | html %]"/> > <input type="hidden" name="override_limit" value="1" /> >@@ -129,7 +128,17 @@ > <input type="hidden" name="override_holds" value="1" /> > <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button> > </form> >- [% END %] >+ [% END %]--> >+ >+ [% IF ((!Koha.Preference('AllowRenewalLimitOverride')) && ((Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) && can_renew == 1) || ((Koha.Preference('AllowRenewalLimitOverride')) && ((Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) && can_renew == 1 ) %] >+ <form method="post" action="/cgi-bin/koha/circ/renew.pl"> >+ <input type="hidden" name="barcode" value="[% item.barcode | html %]"/> >+ <input type="hidden" name="override_limit" value="1" /> >+ <input type="hidden" name="override_holds" value="1" /> >+ <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button> >+ </form> >+ [% END %] >+ > [% ELSIF error == "patron_restricted" %] > > <p>[% borrower.firstname | html %] [% borrower.surname | html %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber | uri %]"> [% borrower.cardnumber | html %] </a> ) is currently restricted.</p> >-- >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 18450
:
62339
|
62447
|
62811
|
63226
|
63292
|
63293
|
63377
|
63764
|
64402
|
69475
|
69476
|
69489
|
72835
|
72836
|
86587
|
86588
|
86589
|
86590
|
86591
|
87337
|
87338
|
87528
|
87529