]> git.koha-community.org Git - koha.git/commit
Bug 17767: Make Koha::Patron::Modification handle extended attributes
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 13 Dec 2016 20:45:41 +0000 (17:45 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 28 Dec 2016 13:53:02 +0000 (13:53 +0000)
commit332895b781993651b7df32a679ab180d83460117
tree137dfa7a8d1f79e90c81a28c21ef86c5184d9d30
parentce0d3fa66217c1e1a99d54ff9eee726c1e68daa4
Bug 17767: Make Koha::Patron::Modification handle extended attributes

This patch makes Koha::Patron::Modification aware of the new extended_attributes
column, which is expected to contain valid JSON data.

The ->store method is modified so it validates the field value (i.e. the content
is decoded using the JSON library) and raises a convenient exception in case of
failure.

This behaviour change is covered by the provided unit tests.

To test:
- Apply the patchset
- Run:
  $ prove t/db_dependent/Koha/Patron/Modifications.t
=> SUCCESS: Tests make sense, and they pass
- Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Exceptions/Patron/Modification.pm
Koha/Patron/Modification.pm
Koha/Patron/Modifications.pm
t/db_dependent/Koha_borrower_modifications.t