[Koha-bugs] [Bug 17318] Make 'Normalization rule' configurable on matchpoint definition

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 29 09:55:15 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #18 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 55902
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55902&action=edit
Bug 17318: Make C4::Matcher::_get_match_keys handle 'norms' param

The current implementation doesn't care about that parameter, and applies
a default normalization rule that seems counter-productive (in general) for
its aleged purpose.

This patch makes it handle the following values for 'norms':

    - upper_case
    - lower_case
    - remove_spaces
    - legacy_default
    - none

They make it call the relevant Koha::Utils::Normalize routines.
'legacy_default'
is used only for backwards compatibility, but could be removed if there's
consensus.

To test:
- Run:
  $ prove t/Matcher.t
=> FAIL: most _get_match_keys tests fail
- Apply the patch
- Run:
  $ prove t/Matcher.t
=> SUCCESS: Tests pass!
- Sign off :-D

Sponsored-by: FIT

Signed-off-by: Mark Tompsett <mtompset at hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list