https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26940
--- Comment #14 from Didier Gautheron <[email protected]> --- (In reply to Jonathan Druart from comment #13) > The expiration date needs to be > NOW, otherwise the patron is not > considered restricted. It is, well it's null select debarredcomment, debarred from borrowers where borrowernumber = 19; +-----------------+------------+ | debarredcomment | debarred | +-----------------+------------+ | | 9999-12-31 | +-----------------+------------+ 1 row in set (0.00 sec) MariaDB [koha_kohadev]> select expiration, comment, NOW() from borrower_debarments where borrowernumber = 19; +------------+---------+---------------------+ | expiration | comment | NOW() | +------------+---------+---------------------+ | NULL | foobar | 2020-11-17 15:09:15 | +------------+---------+---------------------+ 1 row in set (0.00 sec) SQL below is working for me SELECT d.borrowernumber, GROUP_CONCAT(comment SEPARATOR '\n') AS comment FROM borrower_debarments d JOIN borrowers b ON b.borrowernumber=d.borrowernumber WHERE (b.debarredcomment IS NULL OR b.debarredcomment = '') AND ( expiration > CURRENT_DATE() OR expiration IS NULL ) GROUP BY d.borrowernumber; -- 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/
