[Bug 37473] New: Circulation rule holdallowed set to not_allowed results in warning when browsing a biblio record
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37473 Bug ID: 37473 Summary: Circulation rule holdallowed set to not_allowed results in warning when browsing a biblio record Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: baptiste.wojtkowski@biblibre.com QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37473 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29087 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37473 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #1 from Magnus Enger <magnus@libriotech.no> --- I get the same error on Koha 26.05.05, but in a different context: "Holds to pull" (/cgi-bin/koha/circ/pendingreserves.pl) gives a 500 error. I see this in the logs: ==> /var/log/koha/mykoha/plack-error.log <== 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 /usr/share/koha/lib/Koha/Objects.pm line 401 There are several rules like this in the DB: MariaDB [mykoha]> select * from circulation_rules where rule_name = 'holdallowed' and rule_value = 'not_allowed'; +------+------------+--------------+------------+-------------+-------------+ | id | branchcode | categorycode | itemtype | rule_name | rule_value | +------+------------+--------------+------------+-------------+-------------+ | 866 | NULL | NULL | TOOLS | holdallowed | not_allowed | | 871 | NULL | NULL | 7DAY | holdallowed | not_allowed | | 1454 | MYKOHA | NULL | 1DAY | holdallowed | not_allowed | I tried re-creating this in KTD, with no luck. I tried adding a hold to a book, setting this: MariaDB [koha_kohadev]> select * from circulation_rules where rule_name = 'holdallowed' and rule_value = 'not_allowed'; +----+------------+--------------+----------+-------------+-------------+ | id | branchcode | categorycode | itemtype | rule_name | rule_value | +----+------------+--------------+----------+-------------+-------------+ | 38 | NULL | NULL | BK | holdallowed | not_allowed | +----+------------+--------------+----------+-------------+-------------+ and then visiting the "Holds to pull", but that does not give a 500 error, it shows an empty list of holds. So there might be some other factor that triggers the 500 error, that I have not spotted yet. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org