https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17656 --- Comment #315 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196029 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196029&action=edit Bug 17656: (QA follow-up) fix irregularity save on single and bulk renewal For cud-renew (single subscription renewal): - Save permanent_irregularity from the form submission - Recompute irregularity via guess_irregularities for the new period - Remove unused @irregularities variable that was dead code For cud-multi_renew (bulk renewal): - Stop overwriting permanent_irregularity with empty form data - The multi_renew confirmation form has no irregularity inputs, so the previous code was silently clearing permanent_irregularity on every bulk renewal, breaking subsequent renewals Test plan: Setup (run once): 1. Apply all patches in this series 2. Inside KTD: perl installer/data/mysql/updatedatabase.pl 3. Inside KTD: dbic --force --- Test A: single renewal preserves and applies permanent irregularities --- 4. Go to Serials > New subscription - Choose a daily frequency (1 issue/day) - Set 'Number of issues' to 7, start date: any Monday - In the prediction pattern, check Wednesday and Thursday as permanent irregularities - Save the subscription 5. Edit the subscription: - Verify Wednesday and Thursday checkboxes are checked - Verify the prediction pattern shows those days as 'not published' 6. Renew the subscription (Serials > Subscription detail > Renew): - Verify Wednesday and Thursday are pre-checked on the renewal form - Leave them checked and submit 7. Edit the subscription again: - Verify Wednesday and Thursday are still checked [previously broken] - Verify the prediction pattern for the NEW period shows Wednesday and Thursday issues as 'not published' [previously broken] --- Test B: permanent irregularities can be changed at renewal time --- 8. Renew the subscription again: - On the renewal form, uncheck Wednesday, leave Thursday checked - Submit 9. Edit the subscription: - Verify only Thursday is now checked - Verify only Thursday appears as 'not published' in the prediction --- Test C: bulk renewal preserves permanent irregularities --- 10. Create a second subscription with permanent irregularities (e.g. a weekly subscription skipping week 1 and week 3) 11. From the subscription list, select both subscriptions and choose 'Renew selected' (bulk renewal) - Confirm the renewal 12. Edit each subscription: - Verify the permanent irregularity checkboxes are still checked as they were before renewal [previously broken - cleared] - Verify the prediction for each new period shows the correct issues as 'not published' 13. Bulk-renew the subscriptions a second time and repeat step 12 to confirm permanent irregularities survive multiple bulk renewals [previously they were cleared on the first bulk renewal] -- You are receiving this mail because: You are watching all bug changes.