Bug 41265 - NoIssuesChargeGuarantees and NoIssuesChargeGuarantorsWithGuarantees circulation checks not precise enough
Summary: NoIssuesChargeGuarantees and NoIssuesChargeGuarantorsWithGuarantees circulati...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-18 15:57 UTC by Thibaud Guillot (thibaud_g)
Modified: 2025-11-19 08:45 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41265: Checks if NoIssuesChargeGuarantees && NoIssuesChargeGuarantorsWithGuarantees sysprefs limits are not empty (3.28 KB, patch)
2025-11-19 08:45 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Thibaud Guillot (thibaud_g) 2025-11-18 15:57:42 UTC
Hello all

When a checkout is performed, the NoIssuesChargeGuarantees and NoIssuesChargeGuarantorsWithGuarantees values are checked. This is an ‘if’ statement with check values, but by default, these are empty strings and therefore defined in this way. I therefore believe that the verification is not exactly what we want, particularly when SIP performs the checkout without permission to force it.

Furthermore, in kohastructure, the default value would be NULL from what I understand, and it has not been included in the syprefs sql file. Perhaps there are some cases that I am overlooking, but I will suggest a simple fix anyway.
Comment 1 Thibaud Guillot (thibaud_g) 2025-11-18 15:59:17 UTC
I added Bug 39261 which also deals with the format of these sysprefs
Comment 2 Thibaud Guillot (thibaud_g) 2025-11-19 08:45:50 UTC
Created attachment 189694 [details] [review]
Bug 41265: Checks if NoIssuesChargeGuarantees && NoIssuesChargeGuarantorsWithGuarantees sysprefs limits are not empty

Test plan:

1) Create relation between guarantor and guarantees
2) Be sure that one (or both) has outstanding charges
3) Be sure that concerning sysprefs are "empty" / not defined
4) Perform a checkout
5) A warning appears normally, you can fore checkout if you have enough
   permission
6) Apply this patch
7) Repeat step 4), no warning appears

Sponsored-by: BibLibre