Bug 37473

Summary: Circulation rule holdallowed set to not_allowed results in warning when browsing a biblio record
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: SearchingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Baptiste Wojtkowski (bwoj) 2024-07-25 13:29:46 UTC
Circulation rule holdallowed set to not_allowed results in warning when browsing a biblio record : 

> No method count found for Koha::Items
> DBIx::Class::SQLMaker::ClassicExtensions::puke(): Fatal: NULL-within-IN not
> implemented: The upcoming SQL::Abstract::Classic 2.0 will emit the logically
> correct SQL instead of raising this exception. at /home/koha/src/bin/../Koha/
> Objects.pm line 587



from C4/items.pm 

> 64     my @hold_not_allowed_itypes = Koha::CirculationRules->search(
> 65         {
> 66             rule_name    => 'holdallowed',
> 67             branchcode   => undef,
> 68             categorycode => undef,
> 69             rule_value   => 'not_allowed',
> 70         }
> 71     )->get_column('itemtype');

This results in pushing undef in an array and searching "not in" in that array, which is forbidden.