https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42432
--- Comment #4 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 200261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200261&action=edit Bug 42432: Restore 'On hold due date' on patron checkouts table The 'On hold due date' input in the patron checkouts table footer (shown when AllowRenewalOnHoldOverride is enabled and a renewal row is on reserve) is currently ignored: editing it has no effect, and on-hold items are renewed using the 'Renewal due date' value instead. This is a regression from Bug 36084 (commit 99d776f58e0, Feb 2024). That patch ported the renewal AJAX call to use CirculationAPIClient.checkouts.renew() and, in the process, dropped the pre-existing conditional that picked between '#newonholdduedate' (for on-reserve rows) and '#newduedate' (for regular rows). The template input and its show/hide + mirror JS were left in place, so the field still appears and accepts input -- its value is just no longer sent. This patch restores the original behaviour introduced by Bug 7088: for each renewed row, if the row's checkbox has the 'data-on-reserve' attribute, the value from '#newonholdduedate' is used as the renewal due date; otherwise '#newduedate' is used, matching the rest of the table. We identify the row by its hidden value attribute (input.renew[value='<item_id>']) rather than by the checkbox id '#renew_<item_id>', because renew_all() injects a spinner <img> that shares the same id while the request is in flight. Test plan: 1. Set 'AllowRenewalOnHoldOverride' to 'Allow'. 2. Check item A out to patron P1. 3. Place a hold on item A for a different patron P2. 4. Open P1's patron details page and tick the Renew checkbox on the row for item A. Confirm the 'On hold due date' input appears below the 'Renewal due date' input. 5. Set 'Renewal due date' to a date two weeks out, and set 'On hold due date' to a clearly distinct date one month out. 6. Click 'Renew or check in selected items'. 7. Without this patch: the new issues.date_due for item A matches the two-week 'Renewal due date' (the override is ignored). With this patch: issues.date_due matches the one-month 'On hold due date' value. 8. Remove the hold (or pick a different item without a hold), repeat, and confirm the 'Renewal due date' value is used -- non-on-hold renewals are unchanged. References: Bug 7088 (original feature), Bug 36084 (regression). -- 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/
