[Koha-bugs] [Bug 26940] debarred comment in borrowers table is lost on patron modifications in memberentry.pl page
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Nov 17 16:13:01 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26940
--- Comment #14 from Didier Gautheron <didier.gautheron at biblibre.com> ---
(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.
More information about the Koha-bugs
mailing list