Bugzilla – Attachment 63764 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 - Implemented check in renew.tt for block and renewal limits
Bug-18450---Implemented-check-in-renewtt-for-block.patch (text/plain), 4.72 KB, created by
Alex Buckley
on 2017-05-28 05:32:19 UTC
(
hide
)
Description:
Bug 18450 - Implemented check in renew.tt for block and renewal limits
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-05-28 05:32:19 UTC
Size:
4.72 KB
patch
obsolete
>From 94a94f979c6eb6bb5f01ff8bd3d5232c13a498da Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 19 Apr 2017 10:28:49 +1200 >Subject: [PATCH] Bug 18450 - Implemented check in renew.tt for block and > renewal limits > >Test plan: >1. In More->Administration->Global system preferences >ensure that both the AllowRenewalLimitOverride and >AllowRenewalIfOtherItemsAvaliable preferences are both set to 'Dont >allow'. >2. Place a hold on an item from a patron >3. Checkout the item out to a different patron >4. Renew the item and notice the 'Cannot renew: The item is on hold for >another patron' warning >5. Click the 'Override and renew' button and notice that you >can bypass the hold >6. Apply patch >7. Renew the item again and notice that the message does not have a >'Override and renew' button it just has the 'Ignore and continue' button >8. Go back to More->Administration->Global system preferences and set >AllowRenewalLimitOverride to 'Allow' >9. Try renewing the same item again and notice that the 'Override and >renew' button is displayed >10. In systems preferences now set the >AllowRenewalIfOtherItemsAvailable syspref to 'Allow' and >AllowRenewalLimitOverride to 'Dont allow' and notice the 'Override and >renew' button is displayed >11. Now set both these sysprefs to 'Allow' and notice the 'Override and renew' button is displayed >because you will not be violating these preferences. > >Note: Checking if the renewal exceeds the renewal level, if auto renew >is set up, or if renewal is to soon is checked earlier in this >conditional >if statement earlier and so the check in this patch does not need to >check the renewal level, auto renewal, if renewal is too soon. >--- > .../intranet-tmpl/prog/en/modules/circ/renew.tt | 24 ++++++++++++++-------- > 1 file changed, 16 insertions(+), 8 deletions(-) > >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 dbcc096..8a4da5b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >@@ -104,15 +104,23 @@ > > [% ELSIF error == "on_reserve" %] > >- <p>This item is on hold for another patron.</p> >- >- <form method="post" action="/cgi-bin/koha/circ/renew.pl"> >- <input type="hidden" name="barcode" value="[% item.barcode %]"/> >- <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> >+ <p>This item is on hold for another patron.</p> > >+ [% IF (Koha.Preference('AllowRenewalLimitOverride')) && (Koha.Preference('AllowRenewalIfOtherItemsAvailable')) %] >+ <form method="post" action="/cgi-bin/koha/circ/renew.pl"> >+ <input type="hidden" name="barcode" value="[% item.barcode %]"/> >+ <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> >+ [% ELSIF (!(Koha.Preference('AllowRenewalLimitOverride')) && (Koha.Preference('AllowRenewalIfOtherItemsAvailable'))) || (Koha.Preference('AllowRenewalLimitOverride') && (!(Koha.Preference('AllowRenewalIfOtherItemsAvaliable')))) %] >+ <form method="post" action="/cgi-bin/koha/circ/renew.pl"> >+ <input type="hidden" name="barcode" value="[% item.barcode %]"/> >+ <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 %] [% borrower.surname %] ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]"> [% borrower.cardnumber %] </a> ) is currently restricted.</p> >-- >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 18450
:
62339
|
62447
|
62811
|
63226
|
63292
|
63293
|
63377
|
63764
|
64402
|
69475
|
69476
|
69489
|
72835
|
72836
|
86587
|
86588
|
86589
|
86590
|
86591
|
87337
|
87338
|
87528
|
87529