Description
Jonathan Druart
2020-05-21 13:29:50 UTC
Created attachment 105194 [details] [review] Bug 25567: Prevent patron category type's categorycode to be created with "" It must be NULL/undef, the default from the DB. The method Koha::Patron::Attribute::Type->categorycode is not covered by tests! To recreate: Create a new patron attribute type, don't select a patron's category (and not repeatable or unique) Go to the batch patron modification tool, enter a cardnumber, next. => boom! Apply the patch, edit the patron attribute, save Go to the batch patron modification tool, enter a cardnumber, next. => success! Wait, I overlooked something. Created attachment 105195 [details] [review] Bug 25567: Fix typo categorycode vs category_code Well, this is actually the real root of the error! Created attachment 105197 [details] [review] Bug 25567: Fix typo categorycode vs category_code Well, this is actually the real root of the error! Created attachment 105208 [details] [review] Bug 25567: Prevent patron category type's categorycode to be created with "" It must be NULL/undef, the default from the DB. The method Koha::Patron::Attribute::Type->categorycode is not covered by tests! To recreate: Create a new patron attribute type, don't select a patron's category (and not repeatable or unique) Go to the batch patron modification tool, enter a cardnumber, next. => boom! Apply the patch, edit the patron attribute, save Go to the batch patron modification tool, enter a cardnumber, next. => success! Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 105209 [details] [review] Bug 25567: Fix typo categorycode vs category_code Well, this is actually the real root of the error! Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> It works! :D Created attachment 105221 [details] [review] Bug 25567: Prevent patron category type's categorycode to be created with "" It must be NULL/undef, the default from the DB. The method Koha::Patron::Attribute::Type->categorycode is not covered by tests! To recreate: Create a new patron attribute type, don't select a patron's category (and not repeatable or unique) Go to the batch patron modification tool, enter a cardnumber, next. => boom! Apply the patch, edit the patron attribute, save Go to the batch patron modification tool, enter a cardnumber, next. => success! Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 105222 [details] [review] Bug 25567: Fix typo categorycode vs category_code Well, this is actually the real root of the error! Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Nice work everyone! Pushed to master for 20.05 backported to 19.11.x for 19.11.07 (In reply to Jonathan Druart from comment #0) > Certainly caused by bug 20443. It shouldn't be necessary (missing dependency) in 19.11.x and 19.05.x then. (In reply to Jonathan Druart from comment #3) > Created attachment 105195 [details] [review] [review] > Bug 25567: Fix typo categorycode vs category_code > > Well, this is actually the real root of the error! Okay maybe it impacts them also. --- After a quick try of the test plan on 19.05.x: can't reproduce the issue Won't backport to 19.05.x As for 19.11.x - v19.11.06 : can't reproduce the issue - 19.11.x(78d930d438): no issue so the patch shouldn't be a problem. |