Koha-clms/Koha/Patron
Martin Renvoize f68728404d
Bug 39532: Use new FINES restriction type to avoid conflict with SUSPENSION
This patch introduces a new unique restriction type 'FINES' specifically
for the debar_patrons_with_fines.pl script to prevent duplicate
restrictions on repeated runs.

The original fix used 'SUSPENSION' but this conflicted with the
fine-in-days feature which uses SUSPENSION for time-limited restrictions
when overdue items are returned. Running the script would overwrite
those time-limited restrictions with indefinite ones.

Changes:
- Add new 'FINES' system restriction type to patron_restriction_types.yml
  for new installations
- Create database update to add 'FINES' type to existing installations
- Update debar_patrons_with_fines.pl to use 'FINES' instead of 'SUSPENSION'
- Update AddUniqueDebarment and DelUniqueDebarment POD documentation

This keeps SUSPENSION exclusively for the fine-in-days feature while
preventing duplicate restrictions from the fines script.

Test plan:
1. Run database update
2. Verify new FINES restriction type exists in restriction_types table
3. Run debar_patrons_with_fines.pl multiple times
4. Confirm only one FINES restriction per patron (no duplicates)
5. Verify SUSPENSION restrictions from fine-in-days are not affected
6. Run tests: prove t/db_dependent/Patron/Borrower_Debarments.t

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d90333e911)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-12-01 15:53:25 +01:00
..
Attribute Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
MessagePreference
…
Password Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Restriction Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Attribute.pm Bug 26744: Log changes to extended patron attributes 2025-03-10 11:42:31 +01:00
Attributes.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Categories.pm
…
Category.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Consent.pm
…
Consents.pm
…
Debarments.pm Bug 39532: Use new FINES restriction type to avoid conflict with SUSPENSION 2025-12-01 15:53:25 +01:00
Discharge.pm Bug 40458: add pod coverage to Discharge.pm 2025-07-24 21:04:40 +02:00
Files.pm Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
HouseboundProfile.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
HouseboundProfiles.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
HouseboundRole.pm
…
HouseboundRoles.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
HouseboundVisit.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
HouseboundVisits.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Image.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Images.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Message.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
MessagePreference.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
MessagePreferences.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Messages.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Modification.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Modifications.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Relationship.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Relationships.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Restriction.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Restrictions.pm
…