[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:11 CEST 2016


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

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55779|0                           |1
        is obsolete|                            |
  Attachment #55780|0                           |1
        is obsolete|                            |
  Attachment #55781|0                           |1
        is obsolete|                            |

--- Comment #17 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 55901
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55901&action=edit
Bug 17318: Unit tests

The current C4::Matcher::_get_match_keys implementation doesn't take
normalization rules params into account. This patch makes Matcher.t test the
proposed behaviour for new hardcoded values, that match string normalization
routines introduced by Bu 17302.

Possible values are:
- upper_case
- lower_case
- remove_spaces
- legacy_default
- none

* 'legacy_default' is left (for now) to catch the current behaviour. So tests
which
did not get a 'norm' param, now are passed 'legacy_default' and they still
pass.

* 'none' means no normalization, of course

Note: on introducing 'none', a bug got highlighted, because the subfields
traversal loop
was introducing an unneeded space. The tests from 17304 get adjusted to reflect
this.

To test:
- Run:
  $ sudo koha-shell kohadev ; cd kohaclone
  $ prove t/Matcher.t
=> FAIL: The routine doesn't care about the norms param.

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