https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41438

Lucas Gass (lukeg) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #190611|0                           |1
        is obsolete|                            |

--- Comment #11 from Lucas Gass (lukeg) <[email protected]> ---
Created attachment 191511
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191511&action=edit
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

Signed-off-by: Emmi Takkinen <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to