https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26940 --- Comment #16 from Didier Gautheron <didier.gautheron@biblibre.com> --- Hi, (In reply to Jonathan Druart from comment #15)
My patch is only about updating the problematic entries in borrowers.debarredcomment. But in my understanding it doesn't. After step 4) in the first test plan borrowers.debarredcomment is not wrongly set to a NULL value, it's set to an empty string. At least it's what I'm seeing here and in the library reporting the issue.
Number of debarred borrowers with a NULL debarredcomment. SELECT COUNT(*) FROM (SELECT 1 FROM borrower_debarments d JOIN borrowers b ON b.borrowernumber=d.borrowernumber WHERE (b.debarredcomment IS NULL ) AND ( expiration > CURRENT_DATE() OR expiration IS NULL ) GROUP BY d.borrowernumber) as e; +----------+ | COUNT(*) | +----------+ | 14 | +----------+ 1 row in set (0.008 sec) Number of debarred borrowers with an empty debarredcomment but with at least one borrower_debarments comment. MariaDB [koha]> SELECT COUNT(*) FROM (SELECT 1 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 ) AND (comment IS NOT NULL OR comment <> '') GROUP BY d.borrowernumber) as e; +----------+ | COUNT(*) | +----------+ | 2539 | +----------+ 1 row in set (0.013 sec)
It should not modify the test plan of the first patch.
Test plan for second patch is: Create some debarred (and several debarments for some patrons)
update borrowers set debarredcomment=null; Execute the DB entry
=> borrowers.debarredcomment is reset properly with current restrictions' descriptions.
-- You are receiving this mail because: You are watching all bug changes.