This is actually needed in order to implement bug 13757, because the underlying code doesn't handle extended attributes.
Created attachment 58256 [details] [review] Bug 17767: Add borrower_modification.extended_attributes This patch changes the DB structure adding borrower_modifications.extended_attributes
Created attachment 58257 [details] [review] Bug 17767: DBIC update This patch can be skipped by the RM, it just updates the DBIC schema files.
Created attachment 58258 [details] [review] 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
Created attachment 58259 [details] [review] Bug 17767: Unit tests This patch introduces tests for the new behaviour, and also enhances the existing ones aiming to reach full coverage.
Created attachment 58260 [details] [review] Bug 17767: (followup) Rename test file
Created attachment 58358 [details] [review] Bug 17767: Add borrower_modification.extended_attributes This patch changes the DB structure adding borrower_modifications.extended_attributes
Created attachment 58359 [details] [review] Bug 17767: DBIC update This patch can be skipped by the RM, it just updates the DBIC schema files.
Created attachment 58360 [details] [review] 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
Created attachment 58361 [details] [review] Bug 17767: Unit tests This patch introduces tests for the new behaviour, and also enhances the existing ones aiming to reach full coverage.
Created attachment 58362 [details] [review] Bug 17767: (followup) Rename test file
Created attachment 58365 [details] [review] [SIGNED-OFF] Bug 17767: Add borrower_modification.extended_attributes This patch changes the DB structure adding borrower_modifications.extended_attributes Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 58366 [details] [review] [SIGNED-OFF] Bug 17767: DBIC update This patch can be skipped by the RM, it just updates the DBIC schema files. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 58367 [details] [review] [SIGNED-OFF] 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>
Created attachment 58368 [details] [review] [SIGNED-OFF] Bug 17767: Unit tests This patch introduces tests for the new behaviour, and also enhances the existing ones aiming to reach full coverage. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 58369 [details] [review] [SIGNED-OFF] Bug 17767: (followup) Rename test file Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Passes the test plan, in which it passes the test.
Created attachment 58437 [details] [review] Bug 17767: Add borrower_modification.extended_attributes This patch changes the DB structure adding borrower_modifications.extended_attributes Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 58438 [details] [review] Bug 17767: DBIC update This patch can be skipped by the RM, it just updates the DBIC schema files. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 58439 [details] [review] 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>
Created attachment 58440 [details] [review] Bug 17767: Unit tests This patch introduces tests for the new behaviour, and also enhances the existing ones aiming to reach full coverage. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 58441 [details] [review] Bug 17767: (followup) Rename test file Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It would have been good to use the column_exists subroutine added by 17234 (but not pushed yet...)
Pushed to master for 17.05, thanks Tomas!
This won't get ported back to 16.11.x as it is an enhancement.