There are 3 subroutines in C4::Biblio that only do CRUD operations. They can be replaced with a new package Koha::FieldMapping[s]
Created attachment 61091 [details] [review] Bug 18269: Add Koha::FieldMapping[s] packages
Created attachment 61092 [details] [review] Bug 18269: Move field mappings related code to Koha::FieldMapping[s] The 3 subroutines GetFieldMapping, SetFieldMapping and DeleteFieldMapping from the C4::Biblio module were only used from the field mappings admin page. They can easily replaced with new packages Koha::FieldMappings based on Koha::Object[s] Test plan: Add and delete field mappings (admin/fieldmapping.pl, Home › Administration › Keyword to MARC mapping). Add an existing mapping > Nothing should be added Note that this page has not been rewritten and you will not get any feedbacks, but it's not the goal of this page to improve it.
Created attachment 61093 [details] [review] Bug 18269: Add Koha::FieldMapping[s] packages Tested both patches together, works as expected. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 61094 [details] [review] Bug 18269: Move field mappings related code to Koha::FieldMapping[s] The 3 subroutines GetFieldMapping, SetFieldMapping and DeleteFieldMapping from the C4::Biblio module were only used from the field mappings admin page. They can easily replaced with new packages Koha::FieldMappings based on Koha::Object[s] Test plan: Add and delete field mappings (admin/fieldmapping.pl, Home › Administration › Keyword to MARC mapping). Add an existing mapping > Nothing should be added Note that this page has not been rewritten and you will not get any feedbacks, but it's not the goal of this page to improve it. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 61681 [details] [review] Bug 18269: Add Koha::FieldMapping[s] packages Tested both patches together, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 61682 [details] [review] Bug 18269: Move field mappings related code to Koha::FieldMapping[s] The 3 subroutines GetFieldMapping, SetFieldMapping and DeleteFieldMapping from the C4::Biblio module were only used from the field mappings admin page. They can easily replaced with new packages Koha::FieldMappings based on Koha::Object[s] Test plan: Add and delete field mappings (admin/fieldmapping.pl, Home › Administration › Keyword to MARC mapping). Add an existing mapping > Nothing should be added Note that this page has not been rewritten and you will not get any feedbacks, but it's not the goal of this page to improve it. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 17.05, thanks Jonathan!
This won't get ported back to 16.11.x as it is an enhancement.