https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44283 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212594 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212594&action=edit Bug 44283: AddUniqueDebarment: keep an indefinite restriction indefinite Bug 44283: AddUniqueDebarment: keep an indefinite restriction indefinite AddUniqueDebarment did not want to shorten an existing restriction, but only compared two dates. An indefinite restriction updated with a date got that date (debar_patrons_with_fines.pl run once without -e and once with -e turns an open-ended FINES restriction into one that ends), and an update with no date kept the old end date. Now an existing indefinite restriction stays indefinite, an update with no expiration makes the restriction indefinite, and a later existing date is still kept. The existing test asserted that an indefinite OVERDUES restriction takes the date of a later call; it now asserts that it stays indefinite, and new tests cover the two other cases. Test plan: 1. prove t/db_dependent/Patron/Borrower_Debarments.t Without the patch the new tests fail; with it they pass. 2. A patron who owes 50.00: perl misc/cronjobs/debar_patrons_with_fines.pl -a 40 -m 'Fines' -c perl misc/cronjobs/debar_patrons_with_fines.pl -a 40 -m 'Fines' -e 2026-12-31 -c Without the patch the FINES restriction now ends on 2026-12-31; with it, it has no end date. 3. prove t/db_dependent/Circulation/MarkIssueReturned.t Sponsored-by: Koha Solutions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.