Bug 35458 - Issues rules without value can cause problems when perform checkouts on many sites
Summary: Issues rules without value can cause problems when perform checkouts on many ...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-01 10:29 UTC by Thibaud Guillot
Modified: 2023-12-30 20:44 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thibaud Guillot 2023-12-01 10:29:01 UTC
Hello everyone,

In the case of multi-site use, when defining rules such as "maxissueqty" or "patron_maxissueqty", for example, defining a value and then deleting it will allow the basic value to be kept but empty.

As a result, certain code checks based on the rule definition rather than its value may produce unwanted behavior. I want to make sure with this bz that the "can_be_blank" setting could solve this kind of behavior.

Here's a use case: 

For site A, no rule has ever been added to the "Default checkout, hold and return policy" table.

For site B patron_maxissueqty was set to "5", then deleted, and is now set to empty "".

Perform a checkout from site A to a borrower from site C will cause a pop-up with the possibility of forcing the message "This patron can't check out this item per library circulation policy.
No circulation rule is defined for this patron and itemtype combination", whereas the same borrower will be able to obtain an issue without a pop-up for a document linked to site B since the rule is present, the check being based on its presence and not its value.

I therefore wonder whether a list of additional rules could contain the "can_be_blank" parameter introduced by bug 26529 in order to avoid this kind of behavior.