Bugzilla – Attachment 190576 Details for
Bug 41438
Batch hold tool: Suspended holds are unsuspended when making other changes to holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41438: (follow-up) Fix JavaScript validation issues
ec7e54f.patch (text/plain), 2.34 KB, created by
Martin Renvoize (ashimema)
on 2025-12-17 13:40:35 UTC
(
hide
)
Description:
Bug 41438: (follow-up) Fix JavaScript validation issues
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-12-17 13:40:35 UTC
Size:
2.34 KB
patch
obsolete
>From ec7e54f9f5db1589b6a70af30ca39e443050332c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Wed, 17 Dec 2025 13:38:10 +0000 >Subject: [PATCH] Bug 41438: (follow-up) Fix JavaScript validation issues > >This follow-up patch corrects two JavaScript issues in the batch >modify holds form: > >1. Fixes typo: 'suspened' -> 'suspended' on line 637 > This typo prevented the suspended status check from working > correctly when determining if any selected holds are suspended. > >2. Fixes ineffective validation logic on line 643 > When a suspend date is provided without explicitly setting the > suspend status, the code now properly updates the form field > value instead of just setting a local variable. Changes: > - Old: new_suspend_status = 1; > - New: $("#new_suspend_status").val("1"); > > This ensures that setting a suspend date automatically sets > the suspend status to "Suspend" as intended, allowing the > behavior to match the server-side logic. > >Test plan: >1. Navigate to Tools->Batch modify holds >2. Search for and select some holds >3. Set only a "Suspend until" date without changing "Suspend holds" >4. Click "Modify holds" >5. Verify the holds are suspended with the specified date >6. Confirm the form properly auto-selects "Suspend" when a date > is provided >--- > .../intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt >index dbddd4b73f6..7248b4e56ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt >@@ -634,13 +634,13 @@ > var suspended = false; > > hold_ids.forEach(function(hold){ >- if( hold.suspened ){ >+ if( hold.suspended ){ > suspended = true; > } > }); > > if( ( !new_suspend_status || new_suspend_status == "0" || !suspended ) && new_suspend_date ){ >- new_suspend_status = 1; >+ $("#new_suspend_status").val("1"); > } > > if (errors.length > 0) { >-- >2.52.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 41438
:
190454
|
190468
|
190575
|
190576
|
190611