Bug 25567: Prevent patron category type's categorycode to be created with ""
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 May 2020 13:30:35 +0000 (15:30 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 22 May 2020 08:33:17 +0000 (09:33 +0100)
commit7ce6f7895610913f35fb1531faa1a40cefcd5f88
tree993954be00f606c780402591acd2ceae9fc4db06
parentbbe6b07f4340afca18763724194fbc577b77959d
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
admin/patron-attr-types.pl