Bugzilla – Attachment 182184 Details for
Bug 39604
Remember for the session for this patron doesn't remember to cancel a hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39604: Remember cancelreserve choice when remembering patron for session
Bug-39604-Remember-cancelreserve-choice-when-remem.patch (text/plain), 2.64 KB, created by
Martin Renvoize (ashimema)
on 2025-05-09 14:28:41 UTC
(
hide
)
Description:
Bug 39604: Remember cancelreserve choice when remembering patron for session
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-09 14:28:41 UTC
Size:
2.64 KB
patch
obsolete
>From fd05d25d333d923a020223bdb6dee8fb174e415d Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 14 Apr 2025 17:45:18 +0000 >Subject: [PATCH] Bug 39604: Remember cancelreserve choice when remembering > patron for session > >To test: >1. Put a few items on hold and make note of the barcodes. >2. Check out one of the items to a patron who doesn't have the hold >3. Check the cancel hold radio button >4. Also check the Remember for the session for this patron >5. Click 'Yes, check out' >6. Notice the item is checked out and the hold is cancelled >7. No checkout another on hold item to the same patron >8. No confirm screen ( good ) >9. The item is checked out ( good ) >10. The hold is not cancelled. ( bad ) >11. APPLY PATCH and restart all >12. Try steps 1 - 9 again. This time the 2nd hold should be cancelled. > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > circ/circulation.pl | 3 +++ > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 6 ++++++ > 2 files changed, 9 insertions(+) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 43ee3dbe1ba..5d432b4f809 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -487,6 +487,9 @@ if ( @$barcodes && $op eq 'cud-checkout' ) { > my ( $patron_for_session, $session_confirmations ) = split( /:/, $patron_session_confirmation, 2 ); > my $patron_match = $borrowernumber == $patron_for_session; > my @conf_keys = split( /\|/, $session_confirmations ); >+ if ( $patron_match && grep { $_ eq 'cancelreserve' } @conf_keys ) { >+ $cancelreserve = 1; >+ } > $template_params->{sessionConfirmationKeys} = (); > > # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed. >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 8c35b822eb0..185a5488db5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -1729,6 +1729,12 @@ $(document).ready(function () { > sessionConfirmations.push($(this).val()); > }); > >+ // Add cancelreserve checkbox state if it's checked >+ if (rememberForSession) { >+ if ($("#cancelreserve").is(":checked")) { >+ sessionConfirmations.push("cancelreserve"); >+ } >+ } > if (currentPatron != borrowernumber && !rememberForSession) { > Cookies.set("patronSessionConfirmation", borrowernumber + ":", { > sameSite: "Lax", >-- >2.49.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 39604
:
180924
|
180927
| 182184