Bugzilla – Attachment 179088 Details for
Bug 39267
Specified due date remains for checkouts even when removing unchecking remember for session
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39267: Specified due date remains for checkouts even when removing unchecking remember for session
Bug-39267-Specified-due-date-remains-for-checkouts.patch (text/plain), 4.69 KB, created by
David Gustafsson
on 2025-03-07 17:40:07 UTC
(
hide
)
Description:
Bug 39267: Specified due date remains for checkouts even when removing unchecking remember for session
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2025-03-07 17:40:07 UTC
Size:
4.69 KB
patch
obsolete
>From e8f87a10de300a40c4d0bc9cd7820f99b59c8c4b Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Thu, 6 Mar 2025 18:45:35 +0100 >Subject: [PATCH] Bug 39267: Specified due date remains for checkouts even when > removing unchecking remember for session > >To test: >1) Checkout an item for a patron, specify a due date and check remember > for session. >2) Remove the due date, uncheck remember for session and checkout > another item. >3) The previously specified due date is filled in again, while remember > for session remains unchecked. >4) Apply patch >5) Repeat the steps above, in step 3) due date should now remain empty. > >Sponsored-by: Gothenburg University Libarary >--- > circ/circulation.pl | 51 ++++++++++--------- > .../prog/en/modules/circ/circulation.tt | 2 +- > 2 files changed, 27 insertions(+), 26 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 968470e6f17..71f852f0184 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -177,12 +177,38 @@ for my $barcode (@$barcodes) { > $barcode = barcodedecode($barcode) if $barcode; > } > >+# Check if stickyduedate is turned off >+if (@$barcodes) { >+ >+ # was stickyduedate loaded from session? >+ if ( $session->param('stickyduedate') && !$query->param("stickyduedate") ) { >+ $session->clear('stickyduedate'); >+ } >+ >+ $session->param( 'auto_renew', scalar $query->param('auto_renew') ); >+ >+} else { >+ $session->clear('auto_renew'); >+} >+ > my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); > my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); > my $restoreduedatespec = $query->param('restoreduedatespec') || $duedatespec || $session->param('stickyduedate'); > if ( $restoreduedatespec && $restoreduedatespec eq "highholds_empty" ) { > undef $restoreduedatespec; > } >+ >+# Restore date if changed by holds and/or save stickyduedate to session >+if ( $restoreduedatespec || $stickyduedate ) { >+ $duedatespec = $restoreduedatespec || $duedatespec; >+ >+ if ($stickyduedate) { >+ $session->param( 'stickyduedate', $duedatespec ); >+ } >+} elsif ( defined($duedatespec) && !defined($restoreduedatespec) ) { >+ undef $duedatespec; >+} >+ > my $issueconfirmed = $query->param('issueconfirmed'); > my $cancelreserve = $query->param('cancelreserve'); > my $cancel_recall = $query->param('cancel_recall'); >@@ -190,20 +216,6 @@ my $recall_id = $query->param('recall_id'); > my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice > my $charges = $query->param('charges') || q{}; > >-# Check if stickyduedate is turned off >-if (@$barcodes) { >- >- # was stickyduedate loaded from session? >- if ( $stickyduedate && !$query->param("stickyduedate") ) { >- $session->clear('stickyduedate'); >- $stickyduedate = $query->param('stickyduedate'); >- $duedatespec = $query->param('duedatespec'); >- } >- $session->param( 'auto_renew', scalar $query->param('auto_renew') ); >-} else { >- $session->clear('auto_renew'); >-} >- > $template->param( auto_renew => $session->param('auto_renew') ); > > my ( $datedue, $invalidduedate ); >@@ -733,17 +745,6 @@ if ($patron) { > ); > } > >-# Restore date if changed by holds and/or save stickyduedate to session >-if ( $restoreduedatespec || $stickyduedate ) { >- $duedatespec = $restoreduedatespec || $duedatespec; >- >- if ($stickyduedate) { >- $session->param( 'stickyduedate', $duedatespec ); >- } >-} elsif ( defined($duedatespec) && !defined($restoreduedatespec) ) { >- undef $duedatespec; >-} >- > $template->param( > borrowernumber => $borrowernumber, > branch => $branch, >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 a3c9d73f1bb..2df6c586074 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -231,7 +231,7 @@ > [% END %] > > [% IF HIGHHOLDS %] >- <li class="needsconfirm highholds">High demand item. Loan period shortened to [% HIGHHOLDS.duration | html %] days (due [% HIGHHOLDS.returndate | $KohaDates %]). Check out anyway?</li> >+ <li class="needsconfirm highholds">High demand item. WHY THE FUCK IS THIS SHSHOW. Loan period shortened to [% HIGHHOLDS.duration | html %] days (due [% HIGHHOLDS.returndate | $KohaDates %]). Check out anyway?</li> > [% END %] > > [% IF PREVISSUE %] >-- >2.48.1
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 39267
:
179088
|
179089