[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2026-01-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #222 from Martin Renvoize (ashimema) 
 ---
What about just adding the dB update to fix existing notices...

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2026-01-23 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #221 from Emmi Takkinen  ---
(In reply to Lucas Gass (lukeg) from comment #220)
> (In reply to Emmi Takkinen from comment #219)
> > (In reply to Lucas Gass (lukeg) from comment #217)
> > > I have concerns about the oweing -> owing patch. This is going to break a
> > > lot of auto renewal notices for us.
> > 
> > I tried dropping the patch, but there are still a lot code using owing
> > instead of oweing. Those should probably be changed too. So I was wondering,
> > is it okay if I create a separate patch where all owings are changed to
> > oweing rather than dropping the patch and then handling rest of the patches
> > one by one?
> 
> For the change of oweing -> owing we really need a separate bug that would
> also include DB updates of the default auto renewal notices and the issues
> table.

Yes, I agree with that. But what I meant with my comment was that should I
change all the owing terms back to oweing in a new patch in this bug or should
I drop the "Bug 23415: (QA follow-up) Fix spelling: oweing -> owing" patch and
then change all the remaining owing words to oweing.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2026-01-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #220 from Lucas Gass (lukeg)  ---
(In reply to Emmi Takkinen from comment #219)
> (In reply to Lucas Gass (lukeg) from comment #217)
> > I have concerns about the oweing -> owing patch. This is going to break a
> > lot of auto renewal notices for us.
> 
> I tried dropping the patch, but there are still a lot code using owing
> instead of oweing. Those should probably be changed too. So I was wondering,
> is it okay if I create a separate patch where all owings are changed to
> oweing rather than dropping the patch and then handling rest of the patches
> one by one?

For the change of oweing -> owing we really need a separate bug that would also
include DB updates of the default auto renewal notices and the issues table.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2026-01-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #219 from Emmi Takkinen  ---
(In reply to Lucas Gass (lukeg) from comment #217)
> I have concerns about the oweing -> owing patch. This is going to break a
> lot of auto renewal notices for us.

I tried dropping the patch, but there are still a lot code using owing instead
of oweing. Those should probably be changed too. So I was wondering, is it okay
if I create a separate patch where all owings are changed to oweing rather than
dropping the patch and then handling rest of the patches one by one?

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2026-01-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Lucas Gass (lukeg)  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #218 from Lucas Gass (lukeg)  ---
I would prefer that the spelling change of oweing to owing be changed in a
separate bug report.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2026-01-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #217 from Lucas Gass (lukeg)  ---
I have concerns about the oweing -> owing patch. This is going to break a lot
of auto renewal notices for us.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-12-01 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Sarah Cornell  changed:

   What|Removed |Added

 CC||sbcornell@cityofportsmouth.
   ||com

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Lucas Gass (lukeg)  changed:

   What|Removed |Added

   Keywords||rel_26_05_candidate

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Failed QA   |Passed QA

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189735|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189734|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189733|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189732|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189731|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189730|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189729|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189728|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189727|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189726|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189725|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189724|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189723|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189722|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189721|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #216 from Martin Renvoize (ashimema) 
 ---
Created attachment 189750
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189750&action=edit
Bug 23415: (follow-up) Rename sysprefs and add self-checkout control

This follow-up patch addresses feedback from the QA process:

1. System preference naming consistency
   Renamed the following preferences to remove "OPAC" prefix and align
   with the FineNoRenewals naming convention:
   - OPACFineNoRenewalsIncludeCredits → FineNoRenewalsIncludeCredits
   - OPACFineNoRenewalsBlockAutoRenew → FineNoRenewalsBlockAutoRenew

2. Self-checkout backward compatibility
   Added new system preference FineNoRenewalsBlockSelfCheckRenew to
   control whether fine limits block renewals via web-based self-checkout.

   Previously, OPACFineNoRenewals did not block self-checkout renewals.
   With the rename to FineNoRenewals, this behavior changed. The new
   preference defaults to "0" (don't block) to maintain backward
   compatibility, allowing sites to opt-in to blocking self-checkout
   renewals when patrons exceed the fine threshold.

Test plan:
1. Run prove t/db_dependent/Circulation.t - all tests should pass
2. Run prove t/db_dependent/api/v1/checkouts.t - all tests should pass
3. Verify system preferences are correctly renamed in the admin interface
4. Test self-checkout renewals with FineNoRenewalsBlockSelfCheckRenew
   set to 0 (default) - renewals should work even when fines exceed limit
5. Test self-checkout renewals with FineNoRenewalsBlockSelfCheckRenew
   set to 1 - renewals should be blocked when fines exceed limit

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #215 from Martin Renvoize (ashimema) 
 ---
Created attachment 189749
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189749&action=edit
Bug 23415: (follow-up) Respect OPACFineNoRenewalsIncludeCredits preference

This patch fixes a regression introduced in the previous commits where
we changed FineNoRenewals checking to use non_issues_charges instead
of balance. While this change was correct for focusing on blocking
charges, we inadvertently removed the handling of the
OPACFineNoRenewalsIncludeCredits preference.

The OPACFineNoRenewalsIncludeCredits preference controls whether
unapplied account credits should be included when calculating if a
patron exceeds the FineNoRenewals threshold. When this preference is
enabled, the patron's net balance (debits minus credits) should be
used instead of just their outstanding debits.

This patch restores the preference handling for both:
1. Manual renewals in CanBookBeRenewed()
2. Auto renewals in _CanBookBeAutoRenewed()

When OPACFineNoRenewalsIncludeCredits = 1:
  Use balance (all charges net of credits)
When OPACFineNoRenewalsIncludeCredits = 0:
  Use non_issues_charges (only blocking charges, no credits)

This ensures that patrons with sufficient credits can renew their
items when the preference is enabled, while still maintaining the
focus on non-issuing charges introduced in the previous commits.

Test plan:
1. Run prove t/db_dependent/Circulation.t
2. All tests should pass, particularly the
   "auto_too_much_owing | OPACFineNoRenewalsBlockAutoRenew &
   OPACFineNoRenewalsIncludeCredits" subtest

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #214 from Martin Renvoize (ashimema) 
 ---
Created attachment 189748
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189748&action=edit
Bug 23415: Add debt override support to circulation checkout page

This patch implements fine override functionality for the checkouts
table on the circulation page (circ/circulation.pl), completing the
debt override feature for all renewal workflows.

Changes:
- Added override_debt checkbox to checkouts-table.inc when
  AllowFineOverrideRenewing preference is enabled
- Updated /svc/renew to accept and process override_debt parameter,
  matching the pattern used for override_limit
- Enhanced circulation-api-client.js to pass override_debt parameter
  through the renewal API call
- Implemented specific CSS classes for renewal error types
  (renewals-allowed-too_many, renewals-allowed-too_much_owing, etc.)
  to enable selective checkbox control
- Modified override checkbox handlers to selectively enable only
  relevant renewal checkboxes based on the specific blocking error:
  * override_limit enables checkboxes for 'too_many' and 'on_reserve'
  * override_debt enables checkboxes for 'too_much_owing' and
'auto_too_much_owing'
- Added AllowFineOverrideRenewing JavaScript variable to circulation.tt

This provides clear visual feedback to staff about which renewals will
be affected by each override option, improving usability and reducing
confusion when multiple items have different blocking reasons.

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #213 from Martin Renvoize (ashimema) 
 ---
Created attachment 189747
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189747&action=edit
Bug 23415: Fix FineNoRenewals to use non_issues_charges and improve template

This commit addresses two issues:

1. Fixes FineNoRenewals logic to properly use non_issues_charges
   Both CanBookBeRenewed() and _CanBookBeAutoRenewed() were incorrectly
   using the patron's total balance when checking against FineNoRenewals.
   They now use non_issues_charges, which returns only charges that
   should restrict checkouts (e.g., overdues, lost items) as defined by
   debit types with restricts_checkouts=1. This ensures charges like
   rental fees don't inappropriately block renewals.
2. Improves renewal template for AllowFineOverrideRenewing
   - Adds special handling for auto_too_much_owing error to check
 AllowFineOverrideRenewing preference instead of
 AllowRenewalLimitOverride
   - Adds missing id="barcode" attribute to input field for Cypress tests
   - Adds .dialog CSS class to error/success divs for consistent styling
   - Fixes HTML structure with proper  wrapping
   - Adds btn btn-default classes to override button
3. Fixes Cypress test issues
   - Corrects data structure access: items[0] instead of item
   - Uses external_id instead of barcode (API field name)
   - Improves form submission selector specificity
   - Uses REPLACE INTO for system preference setup

Test plan:
1. Run t/cypress/integration/Circulation/FineNoRenewals_spec.ts
2. Verify 4 out of 5 tests pass (one remaining template comparison issue)
3. Manually test that patrons with non-issue charges (rental fees) can
   renew when those charges alone don't exceed FineNoRenewals
4. Verify that patrons with issue-blocking charges (overdues) are
   properly blocked from renewal when exceeding FineNoRenewals

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #212 from Martin Renvoize (ashimema) 
 ---
Created attachment 189746
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189746&action=edit
Bug 23415: Add REST API support for fine override on renewal

This commit adds support for the AllowFineOverrideRenewing functionality
to the REST API renewal endpoints using the standard x-koha-override pattern.

Changes:
1. Added x-koha-override header parameter to both renewal endpoints:
   - POST /checkouts/{checkout_id}/renewal
   - POST /checkouts/{checkout_id}/renewals
2. Updated Koha::REST::V1::Checkouts::renew() to:
   - Check for 'debt_limit' in the overrides stash
   - Check AllowFineOverrideRenewing preference when override is requested
   - Allow renewal override only when both:
 * x-koha-override header contains 'debt_limit' AND
 * AllowFineOverrideRenewing preference is enabled
   - Follows the established x-koha-override pattern used by other endpoints
3. Updated OpenAPI specification (swagger) to document the new header
   using the standard pattern with enum values

Usage:
  curl -X POST /api/v1/checkouts/123/renewal \
-H "x-koha-override: debt_limit"

The override only works for too_much_owing errors and requires
the AllowFineOverrideRenewing system preference to be enabled.

This implementation follows the same pattern as holds and other
endpoints that support overrides, maintaining consistency across
the REST API.

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #211 from Martin Renvoize (ashimema) 
 ---
Created attachment 189745
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189745&action=edit
Bug 23415: Add API tests for fine override on renewal

This commit adds REST API tests to verify the
x-koha-override: debt_limit functionality for renewals.

Tests cover:
- Renewal blocked due to excessive fines
- Override fails when AllowFineOverrideRenewing is disabled
- Override succeeds when AllowFineOverrideRenewing is enabled
- Both /renewal and /renewals endpoints

Test plan:
1. Run: prove t/db_dependent/api/v1/checkouts.t
2. All 110 tests should pass

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #210 from Martin Renvoize (ashimema) 
 ---
Created attachment 189744
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189744&action=edit
Bug 23415: Add Cypress test coverage for FineNoRenewals

This commit adds end-to-end tests for the fine-based
renewal blocking functionality using Cypress.

Test coverage includes:
1. Blocking renewal when patron fines exceed FineNoRenewals limit
2. Displaying override button when AllowFineOverrideRenewing is enabled
3. Hiding override button when AllowFineOverrideRenewing is disabled
4. Successful override when permission is enabled
5. Allowing renewal when fines are below the limit

The test creates test data including:
- A patron with checkouts
- Account fines that exceed the FineNoRenewals threshold
- Tests both blocking and override scenarios

Tests verify the UI behavior matches the business logic:
- Error messages are displayed correctly
- Override buttons appear based on preference setting
- Override functionality works as expected
- Security is maintained (no override without permission)

To run these tests:
  npx cypress run --spec
"t/cypress/integration/Circulation/FineNoRenewals_spec.ts"

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #209 from Martin Renvoize (ashimema) 
 ---
Created attachment 189743
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189743&action=edit
Bug 23415: (QA follow-up) Fix spelling: oweing -> owing

Standardizes error code spelling across the codebase:
- Changes 'too_much_oweing' to 'too_much_owing'
- Changes 'auto_too_much_oweing' to 'auto_too_much_owing'

The word "owing" is the correct spelling in English.

Files updated:
- C4/Circulation.pm
- C4/SIP/Sip/MsgType.pm
- circ/renew.pl
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt
- koha-tmpl/intranet-tmpl/prog/js/checkouts.js
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
- misc/cronjobs/automatic_renewals.pl
- opac/opac-reserve.pl
- opac/opac-user.pl
- t/db_dependent/Circulation.t

All tests should pass successfully.

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #208 from Martin Renvoize (ashimema) 
 ---
Created attachment 189742
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189742&action=edit
Bug 23415: (QA follow-up) Fix logic and security issues

This commit addresses several issues found in QA review:

1. Fixed logic bug in C4::Circulation::CanBookBeRenewed
   - Removed incorrect check of AllowFineOverrideRenewing preference
   - The function now always returns 'too_much_oweing' error when
 patron balance exceeds FineNoRenewals limit
   - AllowFineOverrideRenewing should only control UI override
 capability, not the core renewal check
2. Added permission check in circ/renew.pl
   - Override is now only allowed when both override_debt parameter
 is set AND AllowFineOverrideRenewing preference is enabled
   - Prevents security issue where staff could bypass the preference
 by crafting POST requests
3. Fixed template to conditionally display override button
   - Override button in renew.tt now only shows when
 AllowFineOverrideRenewing is enabled
   - Prevents confusion when override is not permitted
4. Added test coverage
   - Tests verify CanBookBeRenewed behavior with AllowFineOverrideRenewing
 both enabled and disabled
   - Confirms error is always returned regardless of preference setting
5. Fixed minor issues
   - Fixed typo: "he patron" -> "the patron" in checkouts.js
   - Fixed typo: OPACFineNoRenewalsIncludeCredit ->
 OPACFineNoRenewalsIncludeCredits in test

All tests should pass successfully.

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #207 from Martin Renvoize (ashimema) 
 ---
Created attachment 189741
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189741&action=edit
Bug 23415: Fix QA issues

Sponsored-by: OpenFifth 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #206 from Martin Renvoize (ashimema) 
 ---
Created attachment 189740
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189740&action=edit
Bug 23415: Add new syspref AllowFineOverrideRenewing

This patch adds new syspref AllowFineOverrideRenewing. It allows
staff to renew items for patrons whose fines are over limit set
in syspref FineNoRenewals. Otherwise renewing is prevented. If
renewing items is allowed staff is still required to confirm
if they really want to renew items for the patron.

To test:
1. Apply this patch, update database and restart all services.
2. Find patron with fines over limit set in FineNoRenewals and
renewable items.
=> Note that renewing is prevented with message "Cannot renew,
the patron has a debt of..."
3. Set syspref AllowFineOverrideRenewing as "Allow".
=> Note that items can now be renewed and renewing them displays
confirmation pop-up.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Andrew Fuerste Henry 
Signed-of-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #205 from Martin Renvoize (ashimema) 
 ---
Created attachment 189739
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189739&action=edit
Bug 23415: (QA follow-up) Move to Circulation::CanBookBeRenewed

This moves the basic calculation for too_much_oweing out of the
controller and into the class method.

Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #204 from Martin Renvoize (ashimema) 
 ---
Created attachment 189738
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189738&action=edit
Bug 23415: (QA follow-up) Remove OPACFineNoRenewals from syspres.sql

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #203 from Martin Renvoize (ashimema) 
 ---
Created attachment 189737
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189737&action=edit
Bug 23415: Rename OPACFineNoRenewals

OPACFineNoRenewals no longer applies just to OPAC.
To avoid confusion rename it as FineNoRenewals and
also rename all occurences in code.

To test, confirm everything works as described in
previous test plans.

Also prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #202 from Martin Renvoize (ashimema) 
 ---
Created attachment 189736
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189736&action=edit
Bug 23415: Notify patron fines when renewing

It is possible to renew items for patron who has fines over accepted
limit on renew page or from checkout list. This patch adds confirmation
alerts to these renew actions when patron has fines over
"noissuescharge" syspref.

Test plan:
1. Have patron with checkouts and fines over allowed limit
2. Renew checkouts either from renew page or checkout list
=> renew is successful
3. Apply patch
4. Repeat steps 1 and 2
=> On renew page an alert is displayed and user has to confirm
renew
=> When renew is done from checkout list confirmation pop-up
is displayed

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Shi Yao Wang 
Signed-off-by: Andrew Fuerste Henry 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188751|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188750|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188749|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188748|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188747|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188746|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188745|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188744|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188743|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188742|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188741|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188740|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188739|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188738|0   |1
is obsolete||

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #201 from Martin Renvoize (ashimema) 
 ---
Created attachment 189735
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189735&action=edit
Bug 23415: (follow-up) Rename sysprefs and add self-checkout control

This follow-up patch addresses feedback from the QA process:

1. System preference naming consistency
   Renamed the following preferences to remove "OPAC" prefix and align
   with the FineNoRenewals naming convention:
   - OPACFineNoRenewalsIncludeCredits → FineNoRenewalsIncludeCredits
   - OPACFineNoRenewalsBlockAutoRenew → FineNoRenewalsBlockAutoRenew

2. Self-checkout backward compatibility
   Added new system preference FineNoRenewalsBlockSelfCheckRenew to
   control whether fine limits block renewals via web-based self-checkout.

   Previously, OPACFineNoRenewals did not block self-checkout renewals.
   With the rename to FineNoRenewals, this behavior changed. The new
   preference defaults to "0" (don't block) to maintain backward
   compatibility, allowing sites to opt-in to blocking self-checkout
   renewals when patrons exceed the fine threshold.

Test plan:
1. Run prove t/db_dependent/Circulation.t - all tests should pass
2. Run prove t/db_dependent/api/v1/checkouts.t - all tests should pass
3. Verify system preferences are correctly renamed in the admin interface
4. Test self-checkout renewals with FineNoRenewalsBlockSelfCheckRenew
   set to 0 (default) - renewals should work even when fines exceed limit
5. Test self-checkout renewals with FineNoRenewalsBlockSelfCheckRenew
   set to 1 - renewals should be blocked when fines exceed limit

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #200 from Martin Renvoize (ashimema) 
 ---
Created attachment 189734
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189734&action=edit
Bug 23415: (follow-up) Respect OPACFineNoRenewalsIncludeCredits preference

This patch fixes a regression introduced in the previous commits where
we changed FineNoRenewals checking to use non_issues_charges instead
of balance. While this change was correct for focusing on blocking
charges, we inadvertently removed the handling of the
OPACFineNoRenewalsIncludeCredits preference.

The OPACFineNoRenewalsIncludeCredits preference controls whether
unapplied account credits should be included when calculating if a
patron exceeds the FineNoRenewals threshold. When this preference is
enabled, the patron's net balance (debits minus credits) should be
used instead of just their outstanding debits.

This patch restores the preference handling for both:
1. Manual renewals in CanBookBeRenewed()
2. Auto renewals in _CanBookBeAutoRenewed()

When OPACFineNoRenewalsIncludeCredits = 1:
  Use balance (all charges net of credits)
When OPACFineNoRenewalsIncludeCredits = 0:
  Use non_issues_charges (only blocking charges, no credits)

This ensures that patrons with sufficient credits can renew their
items when the preference is enabled, while still maintaining the
focus on non-issuing charges introduced in the previous commits.

Test plan:
1. Run prove t/db_dependent/Circulation.t
2. All tests should pass, particularly the
   "auto_too_much_owing | OPACFineNoRenewalsBlockAutoRenew &
   OPACFineNoRenewalsIncludeCredits" subtest

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #199 from Martin Renvoize (ashimema) 
 ---
Created attachment 189733
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189733&action=edit
Bug 23415: Add debt override support to circulation checkout page

This patch implements fine override functionality for the checkouts
table on the circulation page (circ/circulation.pl), completing the
debt override feature for all renewal workflows.

Changes:
- Added override_debt checkbox to checkouts-table.inc when
  AllowFineOverrideRenewing preference is enabled
- Updated /svc/renew to accept and process override_debt parameter,
  matching the pattern used for override_limit
- Enhanced circulation-api-client.js to pass override_debt parameter
  through the renewal API call
- Implemented specific CSS classes for renewal error types
  (renewals-allowed-too_many, renewals-allowed-too_much_owing, etc.)
  to enable selective checkbox control
- Modified override checkbox handlers to selectively enable only
  relevant renewal checkboxes based on the specific blocking error:
  * override_limit enables checkboxes for 'too_many' and 'on_reserve'
  * override_debt enables checkboxes for 'too_much_owing' and
'auto_too_much_owing'
- Added AllowFineOverrideRenewing JavaScript variable to circulation.tt

This provides clear visual feedback to staff about which renewals will
be affected by each override option, improving usability and reducing
confusion when multiple items have different blocking reasons.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #198 from Martin Renvoize (ashimema) 
 ---
Created attachment 189732
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189732&action=edit
Bug 23415: Fix FineNoRenewals to use non_issues_charges and improve template

This commit addresses two issues:

1. Fixes FineNoRenewals logic to properly use non_issues_charges
   Both CanBookBeRenewed() and _CanBookBeAutoRenewed() were incorrectly
   using the patron's total balance when checking against FineNoRenewals.
   They now use non_issues_charges, which returns only charges that
   should restrict checkouts (e.g., overdues, lost items) as defined by
   debit types with restricts_checkouts=1. This ensures charges like
   rental fees don't inappropriately block renewals.
2. Improves renewal template for AllowFineOverrideRenewing
   - Adds special handling for auto_too_much_owing error to check
 AllowFineOverrideRenewing preference instead of
 AllowRenewalLimitOverride
   - Adds missing id="barcode" attribute to input field for Cypress tests
   - Adds .dialog CSS class to error/success divs for consistent styling
   - Fixes HTML structure with proper  wrapping
   - Adds btn btn-default classes to override button
3. Fixes Cypress test issues
   - Corrects data structure access: items[0] instead of item
   - Uses external_id instead of barcode (API field name)
   - Improves form submission selector specificity
   - Uses REPLACE INTO for system preference setup

Test plan:
1. Run t/cypress/integration/Circulation/FineNoRenewals_spec.ts
2. Verify 4 out of 5 tests pass (one remaining template comparison issue)
3. Manually test that patrons with non-issue charges (rental fees) can
   renew when those charges alone don't exceed FineNoRenewals
4. Verify that patrons with issue-blocking charges (overdues) are
   properly blocked from renewal when exceeding FineNoRenewals

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #197 from Martin Renvoize (ashimema) 
 ---
Created attachment 189731
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189731&action=edit
Bug 23415: Add REST API support for fine override on renewal

This commit adds support for the AllowFineOverrideRenewing functionality
to the REST API renewal endpoints using the standard x-koha-override pattern.

Changes:
1. Added x-koha-override header parameter to both renewal endpoints:
   - POST /checkouts/{checkout_id}/renewal
   - POST /checkouts/{checkout_id}/renewals
2. Updated Koha::REST::V1::Checkouts::renew() to:
   - Check for 'debt_limit' in the overrides stash
   - Check AllowFineOverrideRenewing preference when override is requested
   - Allow renewal override only when both:
 * x-koha-override header contains 'debt_limit' AND
 * AllowFineOverrideRenewing preference is enabled
   - Follows the established x-koha-override pattern used by other endpoints
3. Updated OpenAPI specification (swagger) to document the new header
   using the standard pattern with enum values

Usage:
  curl -X POST /api/v1/checkouts/123/renewal \
-H "x-koha-override: debt_limit"

The override only works for too_much_owing errors and requires
the AllowFineOverrideRenewing system preference to be enabled.

This implementation follows the same pattern as holds and other
endpoints that support overrides, maintaining consistency across
the REST API.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #196 from Martin Renvoize (ashimema) 
 ---
Created attachment 189730
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189730&action=edit
Bug 23415: Add API tests for fine override on renewal

This commit adds REST API tests to verify the
x-koha-override: debt_limit functionality for renewals.

Tests cover:
- Renewal blocked due to excessive fines
- Override fails when AllowFineOverrideRenewing is disabled
- Override succeeds when AllowFineOverrideRenewing is enabled
- Both /renewal and /renewals endpoints

Test plan:
1. Run: prove t/db_dependent/api/v1/checkouts.t
2. All 110 tests should pass

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #195 from Martin Renvoize (ashimema) 
 ---
Created attachment 189729
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189729&action=edit
Bug 23415: Add Cypress test coverage for FineNoRenewals

This commit adds end-to-end tests for the fine-based
renewal blocking functionality using Cypress.

Test coverage includes:
1. Blocking renewal when patron fines exceed FineNoRenewals limit
2. Displaying override button when AllowFineOverrideRenewing is enabled
3. Hiding override button when AllowFineOverrideRenewing is disabled
4. Successful override when permission is enabled
5. Allowing renewal when fines are below the limit

The test creates test data including:
- A patron with checkouts
- Account fines that exceed the FineNoRenewals threshold
- Tests both blocking and override scenarios

Tests verify the UI behavior matches the business logic:
- Error messages are displayed correctly
- Override buttons appear based on preference setting
- Override functionality works as expected
- Security is maintained (no override without permission)

To run these tests:
  npx cypress run --spec
"t/cypress/integration/Circulation/FineNoRenewals_spec.ts"

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #194 from Martin Renvoize (ashimema) 
 ---
Created attachment 189728
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189728&action=edit
Bug 23415: (QA follow-up) Fix spelling: oweing -> owing

Standardizes error code spelling across the codebase:
- Changes 'too_much_oweing' to 'too_much_owing'
- Changes 'auto_too_much_oweing' to 'auto_too_much_owing'

The word "owing" is the correct spelling in English.

Files updated:
- C4/Circulation.pm
- C4/SIP/Sip/MsgType.pm
- circ/renew.pl
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt
- koha-tmpl/intranet-tmpl/prog/js/checkouts.js
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
- misc/cronjobs/automatic_renewals.pl
- opac/opac-reserve.pl
- opac/opac-user.pl
- t/db_dependent/Circulation.t

All tests should pass successfully.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #193 from Martin Renvoize (ashimema) 
 ---
Created attachment 189727
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189727&action=edit
Bug 23415: (QA follow-up) Fix logic and security issues

This commit addresses several issues found in QA review:

1. Fixed logic bug in C4::Circulation::CanBookBeRenewed
   - Removed incorrect check of AllowFineOverrideRenewing preference
   - The function now always returns 'too_much_oweing' error when
 patron balance exceeds FineNoRenewals limit
   - AllowFineOverrideRenewing should only control UI override
 capability, not the core renewal check
2. Added permission check in circ/renew.pl
   - Override is now only allowed when both override_debt parameter
 is set AND AllowFineOverrideRenewing preference is enabled
   - Prevents security issue where staff could bypass the preference
 by crafting POST requests
3. Fixed template to conditionally display override button
   - Override button in renew.tt now only shows when
 AllowFineOverrideRenewing is enabled
   - Prevents confusion when override is not permitted
4. Added test coverage
   - Tests verify CanBookBeRenewed behavior with AllowFineOverrideRenewing
 both enabled and disabled
   - Confirms error is always returned regardless of preference setting
5. Fixed minor issues
   - Fixed typo: "he patron" -> "the patron" in checkouts.js
   - Fixed typo: OPACFineNoRenewalsIncludeCredit ->
 OPACFineNoRenewalsIncludeCredits in test

All tests should pass successfully.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #192 from Martin Renvoize (ashimema) 
 ---
Created attachment 189726
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189726&action=edit
Bug 23415: Fix QA issues

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #191 from Martin Renvoize (ashimema) 
 ---
Created attachment 189725
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189725&action=edit
Bug 23415: Add new syspref AllowFineOverrideRenewing

This patch adds new syspref AllowFineOverrideRenewing. It allows
staff to renew items for patrons whose fines are over limit set
in syspref FineNoRenewals. Otherwise renewing is prevented. If
renewing items is allowed staff is still required to confirm
if they really want to renew items for the patron.

To test:
1. Apply this patch, update database and restart all services.
2. Find patron with fines over limit set in FineNoRenewals and
renewable items.
=> Note that renewing is prevented with message "Cannot renew,
the patron has a debt of..."
3. Set syspref AllowFineOverrideRenewing as "Allow".
=> Note that items can now be renewed and renewing them displays
confirmation pop-up.

Sponsored-by: Koha-Suomi Oy
Signed-of-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #190 from Martin Renvoize (ashimema) 
 ---
Created attachment 189724
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189724&action=edit
Bug 23415: (QA follow-up) Move to Circulation::CanBookBeRenewed

This moves the basic calculation for too_much_oweing out of the
controller and into the class method.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #189 from Martin Renvoize (ashimema) 
 ---
Created attachment 189723
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189723&action=edit
Bug 23415: (QA follow-up) Remove OPACFineNoRenewals from syspres.sql

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #188 from Martin Renvoize (ashimema) 
 ---
Created attachment 189722
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189722&action=edit
Bug 23415: Rename OPACFineNoRenewals

OPACFineNoRenewals no longer applies just to OPAC.
To avoid confusion rename it as FineNoRenewals and
also rename all occurences in code.

To test, confirm everything works as described in
previous test plans.

Also prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-11-20 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #187 from Martin Renvoize (ashimema) 
 ---
Created attachment 189721
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189721&action=edit
Bug 23415: Notify patron fines when renewing

It is possible to renew items for patron who has fines over accepted
limit on renew page or from checkout list. This patch adds confirmation
alerts to these renew actions when patron has fines over
"noissuescharge" syspref.

Test plan:
1. Have patron with checkouts and fines over allowed limit
2. Renew checkouts either from renew page or checkout list
=> renew is successful
3. Apply patch
4. Repeat steps 1 and 2
=> On renew page an alert is displayed and user has to confirm
renew
=> When renew is done from checkout list confirmation pop-up
is displayed

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-31 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #186 from Andrew Fuerste-Henry  ---
These sysprefs should get their names adjusted to remove the "OPAC" so they
match the new name of FineNoRenewals: OPACFineNoRenewalsIncludeCredits,
OPACFineNoRenewalsBlockAutoRenew.

These patches also block renewals via the web-based selfcheck when the patron
has fines over FineNoRenewals, which is a change in behavior.
OPACFineNoRenewals does not currently block renewals via the web-based
selfcheck. This needs a syspref to allow the choice of how self-check renewals
are handled so users can maintain current behavior if desired.

That said, I really like these changes and will be happy to help sign it off!

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-31 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #185 from Martin Renvoize (ashimema) 
 ---
Checks are all happy at this stage, but I'd like a user-facing signoff and then
I think we can upgrade my SO lines to a QA stamp

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-31 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #184 from Martin Renvoize (ashimema) 
 ---
Created attachment 188751
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188751&action=edit
Bug 23415: (follow-up) Respect OPACFineNoRenewalsIncludeCredits preference

This patch fixes a regression introduced in the previous commits where
we changed FineNoRenewals checking to use non_issues_charges instead
of balance. While this change was correct for focusing on blocking
charges, we inadvertently removed the handling of the
OPACFineNoRenewalsIncludeCredits preference.

The OPACFineNoRenewalsIncludeCredits preference controls whether
unapplied account credits should be included when calculating if a
patron exceeds the FineNoRenewals threshold. When this preference is
enabled, the patron's net balance (debits minus credits) should be
used instead of just their outstanding debits.

This patch restores the preference handling for both:
1. Manual renewals in CanBookBeRenewed()
2. Auto renewals in _CanBookBeAutoRenewed()

When OPACFineNoRenewalsIncludeCredits = 1:
  Use balance (all charges net of credits)
When OPACFineNoRenewalsIncludeCredits = 0:
  Use non_issues_charges (only blocking charges, no credits)

This ensures that patrons with sufficient credits can renew their
items when the preference is enabled, while still maintaining the
focus on non-issuing charges introduced in the previous commits.

Test plan:
1. Run prove t/db_dependent/Circulation.t
2. All tests should pass, particularly the
   "auto_too_much_owing | OPACFineNoRenewalsBlockAutoRenew &
   OPACFineNoRenewalsIncludeCredits" subtest

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-31 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #183 from Martin Renvoize (ashimema) 
 ---
Created attachment 188750
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188750&action=edit
Bug 23415: Add debt override support to circulation checkout page

This patch implements fine override functionality for the checkouts
table on the circulation page (circ/circulation.pl), completing the
debt override feature for all renewal workflows.

Changes:
- Added override_debt checkbox to checkouts-table.inc when
  AllowFineOverrideRenewing preference is enabled
- Updated /svc/renew to accept and process override_debt parameter,
  matching the pattern used for override_limit
- Enhanced circulation-api-client.js to pass override_debt parameter
  through the renewal API call
- Implemented specific CSS classes for renewal error types
  (renewals-allowed-too_many, renewals-allowed-too_much_owing, etc.)
  to enable selective checkbox control
- Modified override checkbox handlers to selectively enable only
  relevant renewal checkboxes based on the specific blocking error:
  * override_limit enables checkboxes for 'too_many' and 'on_reserve'
  * override_debt enables checkboxes for 'too_much_owing' and
'auto_too_much_owing'
- Added AllowFineOverrideRenewing JavaScript variable to circulation.tt

This provides clear visual feedback to staff about which renewals will
be affected by each override option, improving usability and reducing
confusion when multiple items have different blocking reasons.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-31 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #182 from Martin Renvoize (ashimema) 
 ---
Created attachment 188749
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188749&action=edit
Bug 23415: Fix FineNoRenewals to use non_issues_charges and improve template

This commit addresses two issues:

1. Fixes FineNoRenewals logic to properly use non_issues_charges
   Both CanBookBeRenewed() and _CanBookBeAutoRenewed() were incorrectly
   using the patron's total balance when checking against FineNoRenewals.
   They now use non_issues_charges, which returns only charges that
   should restrict checkouts (e.g., overdues, lost items) as defined by
   debit types with restricts_checkouts=1. This ensures charges like
   rental fees don't inappropriately block renewals.
2. Improves renewal template for AllowFineOverrideRenewing
   - Adds special handling for auto_too_much_owing error to check
 AllowFineOverrideRenewing preference instead of
 AllowRenewalLimitOverride
   - Adds missing id="barcode" attribute to input field for Cypress tests
   - Adds .dialog CSS class to error/success divs for consistent styling
   - Fixes HTML structure with proper  wrapping
   - Adds btn btn-default classes to override button
3. Fixes Cypress test issues
   - Corrects data structure access: items[0] instead of item
   - Uses external_id instead of barcode (API field name)
   - Improves form submission selector specificity
   - Uses REPLACE INTO for system preference setup

Test plan:
1. Run t/cypress/integration/Circulation/FineNoRenewals_spec.ts
2. Verify 4 out of 5 tests pass (one remaining template comparison issue)
3. Manually test that patrons with non-issue charges (rental fees) can
   renew when those charges alone don't exceed FineNoRenewals
4. Verify that patrons with issue-blocking charges (overdues) are
   properly blocked from renewal when exceeding FineNoRenewals

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-31 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #181 from Martin Renvoize (ashimema) 
 ---
Created attachment 188748
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188748&action=edit
Bug 23415: Add REST API support for fine override on renewal

This commit adds support for the AllowFineOverrideRenewing functionality
to the REST API renewal endpoints using the standard x-koha-override pattern.

Changes:
1. Added x-koha-override header parameter to both renewal endpoints:
   - POST /checkouts/{checkout_id}/renewal
   - POST /checkouts/{checkout_id}/renewals
2. Updated Koha::REST::V1::Checkouts::renew() to:
   - Check for 'debt_limit' in the overrides stash
   - Check AllowFineOverrideRenewing preference when override is requested
   - Allow renewal override only when both:
 * x-koha-override header contains 'debt_limit' AND
 * AllowFineOverrideRenewing preference is enabled
   - Follows the established x-koha-override pattern used by other endpoints
3. Updated OpenAPI specification (swagger) to document the new header
   using the standard pattern with enum values

Usage:
  curl -X POST /api/v1/checkouts/123/renewal \
-H "x-koha-override: debt_limit"

The override only works for too_much_owing errors and requires
the AllowFineOverrideRenewing system preference to be enabled.

This implementation follows the same pattern as holds and other
endpoints that support overrides, maintaining consistency across
the REST API.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #180 from Martin Renvoize (ashimema) 
 ---
Created attachment 188747
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188747&action=edit
Bug 23415: Add API tests for fine override on renewal

This commit adds REST API tests to verify the
x-koha-override: debt_limit functionality for renewals.

Tests cover:
- Renewal blocked due to excessive fines
- Override fails when AllowFineOverrideRenewing is disabled
- Override succeeds when AllowFineOverrideRenewing is enabled
- Both /renewal and /renewals endpoints

Test plan:
1. Run: prove t/db_dependent/api/v1/checkouts.t
2. All 110 tests should pass

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #179 from Martin Renvoize (ashimema) 
 ---
Created attachment 188746
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188746&action=edit
Bug 23415: Add Cypress test coverage for FineNoRenewals

This commit adds end-to-end tests for the fine-based
renewal blocking functionality using Cypress.

Test coverage includes:
1. Blocking renewal when patron fines exceed FineNoRenewals limit
2. Displaying override button when AllowFineOverrideRenewing is enabled
3. Hiding override button when AllowFineOverrideRenewing is disabled
4. Successful override when permission is enabled
5. Allowing renewal when fines are below the limit

The test creates test data including:
- A patron with checkouts
- Account fines that exceed the FineNoRenewals threshold
- Tests both blocking and override scenarios

Tests verify the UI behavior matches the business logic:
- Error messages are displayed correctly
- Override buttons appear based on preference setting
- Override functionality works as expected
- Security is maintained (no override without permission)

To run these tests:
  npx cypress run --spec
"t/cypress/integration/Circulation/FineNoRenewals_spec.ts"

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #178 from Martin Renvoize (ashimema) 
 ---
Created attachment 188745
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188745&action=edit
Bug 23415: (QA follow-up) Fix spelling: oweing -> owing

Standardizes error code spelling across the codebase:
- Changes 'too_much_oweing' to 'too_much_owing'
- Changes 'auto_too_much_oweing' to 'auto_too_much_owing'

The word "owing" is the correct spelling in English.

Files updated:
- C4/Circulation.pm
- C4/SIP/Sip/MsgType.pm
- circ/renew.pl
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt
- koha-tmpl/intranet-tmpl/prog/js/checkouts.js
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
- misc/cronjobs/automatic_renewals.pl
- opac/opac-reserve.pl
- opac/opac-user.pl
- t/db_dependent/Circulation.t

All tests should pass successfully.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #177 from Martin Renvoize (ashimema) 
 ---
Created attachment 188744
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188744&action=edit
Bug 23415: (QA follow-up) Fix logic and security issues

This commit addresses several issues found in QA review:

1. Fixed logic bug in C4::Circulation::CanBookBeRenewed
   - Removed incorrect check of AllowFineOverrideRenewing preference
   - The function now always returns 'too_much_oweing' error when
 patron balance exceeds FineNoRenewals limit
   - AllowFineOverrideRenewing should only control UI override
 capability, not the core renewal check
2. Added permission check in circ/renew.pl
   - Override is now only allowed when both override_debt parameter
 is set AND AllowFineOverrideRenewing preference is enabled
   - Prevents security issue where staff could bypass the preference
 by crafting POST requests
3. Fixed template to conditionally display override button
   - Override button in renew.tt now only shows when
 AllowFineOverrideRenewing is enabled
   - Prevents confusion when override is not permitted
4. Added test coverage
   - Tests verify CanBookBeRenewed behavior with AllowFineOverrideRenewing
 both enabled and disabled
   - Confirms error is always returned regardless of preference setting
5. Fixed minor issues
   - Fixed typo: "he patron" -> "the patron" in checkouts.js
   - Fixed typo: OPACFineNoRenewalsIncludeCredit ->
 OPACFineNoRenewalsIncludeCredits in test

All tests should pass successfully.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #176 from Martin Renvoize (ashimema) 
 ---
Created attachment 188743
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188743&action=edit
Bug 23415: Fix QA issues

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #175 from Martin Renvoize (ashimema) 
 ---
Created attachment 188742
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188742&action=edit
Bug 23415: Add new syspref AllowFineOverrideRenewing

This patch adds new syspref AllowFineOverrideRenewing. It allows
staff to renew items for patrons whose fines are over limit set
in syspref FineNoRenewals. Otherwise renewing is prevented. If
renewing items is allowed staff is still required to confirm
if they really want to renew items for the patron.

To test:
1. Apply this patch, update database and restart all services.
2. Find patron with fines over limit set in FineNoRenewals and
renewable items.
=> Note that renewing is prevented with message "Cannot renew,
the patron has a debt of..."
3. Set syspref AllowFineOverrideRenewing as "Allow".
=> Note that items can now be renewed and renewing them displays
confirmation pop-up.

Sponsored-by: Koha-Suomi Oy
Signed-of-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #174 from Martin Renvoize (ashimema) 
 ---
Created attachment 188741
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188741&action=edit
Bug 23415: (QA follow-up) Move to Circulation::CanBookBeRenewed

This moves the basic calculation for too_much_oweing out of the
controller and into the class method.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #173 from Martin Renvoize (ashimema) 
 ---
Created attachment 188740
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188740&action=edit
Bug 23415: (QA follow-up) Remove OPACFineNoRenewals from syspres.sql

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #172 from Martin Renvoize (ashimema) 
 ---
Created attachment 188739
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188739&action=edit
Bug 23415: Rename OPACFineNoRenewals

OPACFineNoRenewals no longer applies just to OPAC.
To avoid confusion rename it as FineNoRenewals and
also rename all occurences in code.

To test, confirm everything works as described in
previous test plans.

Also prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188340|0   |1
is obsolete||
 Attachment #188341|0   |1
is obsolete||
 Attachment #188342|0   |1
is obsolete||
 Attachment #188712|0   |1
is obsolete||
 Attachment #188713|0   |1
is obsolete||
 Attachment #188714|0   |1
is obsolete||
 Attachment #188715|0   |1
is obsolete||
 Attachment #188716|0   |1
is obsolete||
 Attachment #188717|0   |1
is obsolete||
 Attachment #188718|0   |1
is obsolete||
 Attachment #188719|0   |1
is obsolete||
 Attachment #188720|0   |1
is obsolete||

--- Comment #171 from Martin Renvoize (ashimema) 
 ---
Created attachment 188738
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188738&action=edit
Bug 23415: Notify patron fines when renewing

It is possible to renew items for patron who has fines over accepted
limit on renew page or from checkout list. This patch adds confirmation
alerts to these renew actions when patron has fines over
"noissuescharge" syspref.

Test plan:
1. Have patron with checkouts and fines over allowed limit
2. Renew checkouts either from renew page or checkout list
=> renew is successful
3. Apply patch
4. Repeat steps 1 and 2
=> On renew page an alert is displayed and user has to confirm
renew
=> When renew is done from checkout list confirmation pop-up
is displayed

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188711|0   |1
is obsolete||

--- Comment #170 from Martin Renvoize (ashimema) 
 ---
Created attachment 188720
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188720&action=edit
Bug 23415: Tidy template parameters block

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188710|0   |1
is obsolete||

--- Comment #169 from Martin Renvoize (ashimema) 
 ---
Created attachment 188719
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188719&action=edit
Bug 23415: (QA follow-up) Remove OPACFineNoRenewals from syspres.sql

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188709|0   |1
is obsolete||

--- Comment #168 from Martin Renvoize (ashimema) 
 ---
Created attachment 188718
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188718&action=edit
Bug 23415: Rename OPACFineNoRenewals

OPACFineNoRenewals no longer applies just to OPAC.
To avoid confusion rename it as FineNoRenewals and
also rename all occurences in code.

To test, confirm everything works as described in
previous test plans.

Also prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188708|0   |1
is obsolete||

--- Comment #167 from Martin Renvoize (ashimema) 
 ---
Created attachment 188717
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188717&action=edit
Bug 23415: Notify patron fines when renewing

It is possible to renew items for patron who has fines over accepted
limit on renew page or from checkout list. This patch adds confirmation
alerts to these renew actions when patron has fines over
"noissuescharge" syspref.

Test plan:
1. Have patron with checkouts and fines over allowed limit
2. Renew checkouts either from renew page or checkout list
=> renew is successful
3. Apply patch
4. Repeat steps 1 and 2
=> On renew page an alert is displayed and user has to confirm
renew
=> When renew is done from checkout list confirmation pop-up
is displayed

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188339|0   |1
is obsolete||

--- Comment #166 from Martin Renvoize (ashimema) 
 ---
Created attachment 188716
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188716&action=edit
Bug 23415: (QA follow-up) Fix spelling: oweing -> owing

Standardizes error code spelling across the codebase:
- Changes 'too_much_oweing' to 'too_much_owing'
- Changes 'auto_too_much_oweing' to 'auto_too_much_owing'

The word "owing" is the correct spelling in English.

Files updated:
- C4/Circulation.pm
- C4/SIP/Sip/MsgType.pm
- circ/renew.pl
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt
- koha-tmpl/intranet-tmpl/prog/js/checkouts.js
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
- misc/cronjobs/automatic_renewals.pl
- opac/opac-reserve.pl
- opac/opac-user.pl
- t/db_dependent/Circulation.t

All tests pass successfully.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188338|0   |1
is obsolete||

--- Comment #165 from Martin Renvoize (ashimema) 
 ---
Created attachment 188715
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188715&action=edit
Bug 23415: (QA follow-up) Fix critical logic and security issues

This commit addresses several critical issues found in QA review:

1. Fixed critical logic bug in C4::Circulation::CanBookBeRenewed
   - Removed incorrect check of AllowFineOverrideRenewing preference
   - The function now always returns 'too_much_oweing' error when
 patron balance exceeds FineNoRenewals limit
   - AllowFineOverrideRenewing should only control UI override
 capability, not the core renewal check

2. Added permission check in circ/renew.pl
   - Override is now only allowed when both override_debt parameter
 is set AND AllowFineOverrideRenewing preference is enabled
   - Prevents security issue where staff could bypass the preference
 by crafting POST requests

3. Fixed template to conditionally display override button
   - Override button in renew.tt now only shows when
 AllowFineOverrideRenewing is enabled
   - Prevents confusion when override is not permitted

4. Added comprehensive test coverage
   - Tests verify CanBookBeRenewed behavior with AllowFineOverrideRenewing
 both enabled and disabled
   - Confirms error is always returned regardless of preference setting
   - Increased test count from 116 to 120

5. Fixed minor issues
   - Fixed typo: "he patron" -> "the patron" in checkouts.js
   - Fixed typo: OPACFineNoRenewalsIncludeCredit ->
 OPACFineNoRenewalsIncludeCredits in test

All tests pass successfully.

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188337|0   |1
is obsolete||

--- Comment #164 from Martin Renvoize (ashimema) 
 ---
Created attachment 188714
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188714&action=edit
Bug 23415: Fix QA issues

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188336|0   |1
is obsolete||

--- Comment #163 from Martin Renvoize (ashimema) 
 ---
Created attachment 188713
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188713&action=edit
Bug 23415: Add new syspref AllowFineOverrideRenewing

This patch adds new syspref AllowFineOverrideRenewing. It allows
staff to renew items for patrons whose fines are over limit set
in syspref FineNoRenewals. Otherwise renewing is prevented. If
renewing items is allowed staff is still required to confirm
if they really want to renew items for the patron.

To test:
1. Apply this patch, update database and restart all services.
2. Find patron with fines over limit set in FineNoRenewals and
renewable items.
=> Note that renewing is prevented with message "Cannot renew,
he patron has a debt of..."
3. Set syspref AllowFineOverrideRenewing as "Allow".
=> Note that items can now be renewed and renewing them displays
confirmation pop-up.

Sponsored-by: Koha-Suomi Oy

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188335|0   |1
is obsolete||

--- Comment #162 from Martin Renvoize (ashimema) 
 ---
Created attachment 188712
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188712&action=edit
Bug 23415: (QA follow-up) Move to Circulation::CanBookBeRenewed

This moves the basic calculation for too_much_oweing out of the
controller and into the class method.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188334|0   |1
is obsolete||

--- Comment #161 from Martin Renvoize (ashimema) 
 ---
Created attachment 188711
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188711&action=edit
Bug 23415: Tidy template parameters block

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188333|0   |1
is obsolete||

--- Comment #160 from Martin Renvoize (ashimema) 
 ---
Created attachment 188710
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188710&action=edit
Bug 23415: (QA follow-up) Remove OPACFineNoRenewals from syspres.sql

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188332|0   |1
is obsolete||

--- Comment #159 from Martin Renvoize (ashimema) 
 ---
Created attachment 188709
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188709&action=edit
Bug 23415: Rename OPACFineNoRenewals

OPACFineNoRenewals no longer applies just to OPAC.
To avoid confusion rename it as FineNoRenewals and
also rename all occurences in code.

To test, confirm everything works as described in
previous test plans.

Also prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize 
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188331|0   |1
is obsolete||

--- Comment #158 from Martin Renvoize (ashimema) 
 ---
Created attachment 188708
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188708&action=edit
Bug 23415: Notify patron fines when renewing

It is possible to renew items for patron who has fines over accepted
limit on renew page or from checkout list. This patch adds confirmation
alerts to these renew actions when patron has fines over
"noissuescharge" syspref.

Test plan:
1. Have patron with checkouts and fines over allowed limit
2. Renew checkouts either from renew page or checkout list
=> renew is successful
3. Apply patch
4. Repeat steps 1 and 2
=> On renew page an alert is displayed and user has to confirm
renew
=> When renew is done from checkout list confirmation pop-up
is displayed

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Shi Yao Wang 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #157 from David Nind  ---
(In reply to Martin Renvoize (ashimema) from comment #156)
> Thanks for testing David, I was meaning to revisit the test plan as I wasn't
> happy with how verbose it ended up relying on AI to generate it... but I'm
> glad it helped.
> 
> I've found and fixed the issue with the Cypress test (caching in the tests
> themselves), but whilst doing so I also found a few more edge cases in the
> implementation to test (namely, renewing from the checkouts list tables)
> 
> I'll be submitting a new patchset soon, rebased and with a few follow-ups.
> 
> Thanks again

+10

-- 
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/


[Koha-bugs] [Bug 23415] Notify patron fines when renewing

2025-10-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415

--- Comment #156 from Martin Renvoize (ashimema) 
 ---
Thanks for testing David, I was meaning to revisit the test plan as I wasn't
happy with how verbose it ended up relying on AI to generate it... but I'm glad
it helped.

I've found and fixed the issue with the Cypress test (caching in the tests
themselves), but whilst doing so I also found a few more edge cases in the
implementation to test (namely, renewing from the checkouts list tables)

I'll be submitting a new patchset soon, rebased and with a few follow-ups.

Thanks again

-- 
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/


  1   2   3   >