Bugzilla – Attachment 40707 Details for
Bug 10067
decreaseLoanHighHolds messes with specify due date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10067 - decreaseLoanHighHolds messes with specify due date
Bug-10067---decreaseLoanHighHolds-messes-with-spec.patch (text/plain), 7.14 KB, created by
Chris Cormack
on 2015-06-29 04:12:46 UTC
(
hide
)
Description:
Bug 10067 - decreaseLoanHighHolds messes with specify due date
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2015-06-29 04:12:46 UTC
Size:
7.14 KB
patch
obsolete
>From 440150dd410145ef5c8b25bc2d1fc7ead1f3f5c2 Mon Sep 17 00:00:00 2001 >From: Eivin Giske Skaaren <eskaaren@yahoo.no> >Date: Mon, 25 May 2015 17:10:54 +0000 >Subject: [PATCH] Bug 10067 - decreaseLoanHighHolds messes with specify due > date > >To test: > >1. On a branch up to date with master: apply the patch. > >2. Try to check out items both with and without holds. >(The decreaseLoanHighHolds function should be configured and kick in when testing an item. > >3. Expected results are: >The due date date field should be cleared after checkout if "Remember for session" >is not selected. If it is selected then the chosen date should stay in the field even >if the warning about reduced loan time for an item with too many holds is displayed. >Also the correct due dates are shown in the table after a checkout. > >Known limitation: Does not work too well when jumping between different parts >of the system as it relies on the values sent to the circulation.pl script. > >Sponsored-by: Halland County Library >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >This does what it says it will do, however I think it might be a >change of behaviour, in terms of the specify due date. It now clears >it the date after ever item is checked out. > >Previously the due date would stay, until the current borrower is >dealt with. And remember for session sets it so that it stays until >the staff member logs out, or clears it. > >With the patch, now the date is clear after every check out .. this is >a change that may annoy some people. >--- > circ/circulation.pl | 13 +++++++++++-- > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 14 ++++++-------- > 2 files changed, 17 insertions(+), 10 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 1071f4f..2bf1273 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -55,7 +55,6 @@ use Date::Calc qw( > ); > use List::MoreUtils qw/uniq/; > >- > # > # PARAMETERS READING > # >@@ -122,7 +121,6 @@ my $borrowernumber = $query->param('borrowernumber'); > $branch = C4::Context->userenv->{'branch'}; > $printer = C4::Context->userenv->{'branchprinter'}; > >- > # If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian > if (C4::Context->preference("AutoLocation") != 1) { > $template->param(ManualLocation => 1); >@@ -138,6 +136,7 @@ $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace > $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); > my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); > my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); >+my $restoreduedatespec = $query->param('restoreduedatespec') || $session->param('stickyduedate'); > my $issueconfirmed = $query->param('issueconfirmed'); > my $cancelreserve = $query->param('cancelreserve'); > my $print = $query->param('print') || q{}; >@@ -541,6 +540,15 @@ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{stree > > $template->param(%$borrower); > >+unless ($stickyduedate eq 'on') { >+ $duedatespec = ''; >+} else { >+ if ($restoreduedatespec) { >+ $duedatespec = $restoreduedatespec; >+ } >+ $session->param( 'stickyduedate', $duedatespec ); >+} >+ > $template->param( > lib_messages_loop => $lib_messages_loop, > bor_messages_loop => $bor_messages_loop, >@@ -559,6 +567,7 @@ $template->param( > barcode => $barcode, > stickyduedate => $stickyduedate, > duedatespec => $duedatespec, >+ restoreduedatespec => $restoreduedatespec, > message => $message, > totaldue => sprintf('%.2f', $total), > inprocess => $inprocess, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 0521d9c..8f2bcb8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -310,13 +310,14 @@ $(document).ready(function() { > [% IF HIGHHOLDS %] > <script language="JavaScript" type="text/javascript"> > $(document).ready(function() { >- $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]'); >+ $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]'); > }); > </script> > [% END %] > > [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %] > <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off"> >+ <input type="hidden" name="restoreduedatespec" value="[% duedatespec %]" /> > > [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] > >@@ -381,6 +382,7 @@ $(document).ready(function() { > [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="duedatespec" value="[% duedatespec %]" /> >+ <input type="hidden" name="restoreduedatespec" value="[% duedatespec %]" /> > <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" /> > [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %] > [% IF ( RENEW_ISSUE ) %] >@@ -431,6 +433,7 @@ $(document).ready(function() { > [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="duedatespec" value="[% duedatespec %]" /> >+ <input type="hidden" name="restoreduedatespec" value="[% duedatespec %]" /> > <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" /> > <input type="hidden" name="branch" value="[% branch %]" /> > <input type="hidden" name="barcode" value="[% book.barcode %]" /> >@@ -536,11 +539,11 @@ No patron matched <span class="ex">[% message %]</span> > </h4> > [% END %] > >- > [% IF ( borrowers ) %] > [% INCLUDE 'patron-toolbar.inc' %] > > <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off"> >+ <input type="hidden" name="restoreduedatespec" value="[% duedatespec %]" /> > <fieldset id="circ_circulation_selectborrower" class="brief"> > <legend>Patron selection</legend> > >@@ -591,8 +594,8 @@ No patron matched <span class="ex">[% message %]</span> > > [% END %] > >- > <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off"> >+ <input type="hidden" name="restoreduedatespec" value="[% duedatespec %]" /> > [% IF ( issue ) %] > <fieldset id="circ_circulation_issue" class="lastchecked"> > [% ELSE %] >@@ -776,8 +779,6 @@ No patron matched <span class="ex">[% message %]</span> > </li> > [% END %] > >- >- > </ul> > </div> > >@@ -836,7 +837,6 @@ No patron matched <span class="ex">[% message %]</span> > <!-- /If flagged -->[% END %] > > >- > </div> > </div> > >@@ -950,8 +950,6 @@ No patron matched <span class="ex">[% message %]</span> > </div></div> > [% END %] > >- >- > </div> > </div> > [% UNLESS ( borrowers ) %][% IF ( borrowernumber ) %]<div class="yui-b"> >-- >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 10067
:
39466
|
39491
|
40707
|
41012
|
42127
|
42128
|
42259
|
42437
|
42438
|
42750
|
42791
|
42793
|
42794
|
44290
|
44291
|
44292
|
44300
|
44301
|
44908