Bug 18269 - Move field mappings related code to Koha::FieldMapping[s]
Summary: Move field mappings related code to Koha::FieldMapping[s]
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 15449
  Show dependency treegraph
 
Reported: 2017-03-14 21:15 UTC by Jonathan Druart
Modified: 2017-12-07 22:15 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18269: Add Koha::FieldMapping[s] packages (2.93 KB, patch)
2017-03-14 21:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18269: Move field mappings related code to Koha::FieldMapping[s] (8.34 KB, patch)
2017-03-14 21:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18269: Add Koha::FieldMapping[s] packages (3.11 KB, patch)
2017-03-15 09:35 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18269: Move field mappings related code to Koha::FieldMapping[s] (8.42 KB, patch)
2017-03-15 09:36 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18269: Add Koha::FieldMapping[s] packages (3.17 KB, patch)
2017-03-29 14:35 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18269: Move field mappings related code to Koha::FieldMapping[s] (8.48 KB, patch)
2017-03-29 14:35 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-03-14 21:15:15 UTC
There are 3 subroutines in C4::Biblio that only do CRUD operations. They can be replaced with a new package Koha::FieldMapping[s]
Comment 1 Jonathan Druart 2017-03-14 21:21:25 UTC
Created attachment 61091 [details] [review]
Bug 18269: Add Koha::FieldMapping[s] packages
Comment 2 Jonathan Druart 2017-03-14 21:21:29 UTC
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.
Comment 3 Marc Véron 2017-03-15 09:35:05 UTC
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>
Comment 4 Marc Véron 2017-03-15 09:36:20 UTC
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>
Comment 5 Nick Clemens 2017-03-29 14:35:41 UTC
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>
Comment 6 Nick Clemens 2017-03-29 14:35:49 UTC
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>
Comment 7 Kyle M Hall 2017-03-31 11:00:40 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 8 Katrin Fischer 2017-04-02 16:19:24 UTC
This won't get ported back to 16.11.x as it is an enhancement.