Bug 17897 - Koha::SearchMappingManager - Simplify search mapping modifications
Summary: Koha::SearchMappingManager - Simplify search mapping modifications
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on: 17885
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-13 10:50 UTC by Olli-Antti Kivilahti
Modified: 2018-03-12 14:47 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17897 - Koha::SearchMappingManager - Simplify search mapping modifications (13.85 KB, patch)
2017-01-13 10:53 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 17897 - (follow-up) Cleanup after tests (3.18 KB, patch)
2017-08-01 12:28 UTC, Lari Taskula
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2017-01-13 10:50:59 UTC
Currently there is a lot of DBIC-magic everywhere where search mappings (search_fields, search_marc_to_field, search_marc_map -tables) are CRUD:ed.

Encapsulate this hard-to-read DBIC-magic into a Manager class which promotes code-reusability and thus, simpler test case writing.

Includes tests for Bug 17885
Comment 1 Olli-Antti Kivilahti 2017-01-13 10:53:03 UTC
Created attachment 58942 [details] [review]
Bug 17897 - Koha::SearchMappingManager - Simplify search mapping modifications

Currently there is a lot of DBIC-magic everywhere where search mappings
(search_fields, search_marc_to_field, search_marc_map -tables) are CRUD:ed.

Encapsulate this hard-to-read DBIC-magic into a Manager class which promotes
code-reusability and thus, simpler test case writing.

Includes tests for Buug 17885
Comment 2 Olli-Antti Kivilahti 2017-01-13 10:54:08 UTC
Test plan is to run the elasticsearch-dependent tests in t/db_dependent/Koha*
Comment 3 Lari Taskula 2017-08-01 12:28:56 UTC
Created attachment 65392 [details] [review]
Bug 17897 - (follow-up) Cleanup after tests

Adds rollback to test data in t/db_dependent/Koha/SearchEngine/ElasticSearch.t

To test:
1. prove t/db_dependent/Koha/SearchEngine/ElasticSearch.t
Comment 4 Nick Clemens 2018-03-12 14:47:33 UTC
fatal: sha1 information is lacking or useless (Koha/SearchEngine/Elasticsearch.pm).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.