[koha-commits] main Koha release repository branch master updated. v16.05.00-1097-g6fb9942
Git repo owner
gitmaster at git.koha-community.org
Fri Oct 21 18:16:52 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, master has been updated
via 6fb994257ecf74f65b0951564341561dd40df3a5 (commit)
via 4579f1ad906b28a78c0ef7a1669b0a08138745d1 (commit)
via a0af2d7d5ceb28848488c4f66e486f646341eedf (commit)
from e155029eea393931b56370b57ade8a7f07613ef5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6fb994257ecf74f65b0951564341561dd40df3a5
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Wed Sep 21 11:40:09 2016 -0300
Bug 17318: Allow chosing fixed normalization routines
This patch changes the matching-rules.pl page, so it allows the user to choose
from the different hardcoded normalization routines. It is done using TT blocks
and the routine descriptions are translatable.
To test:
- Create some matching rule
- Have free text values on the 'Normalization rule' field
- Apply the patches
- Create a new routine
=> SUCCESS: You can now only choose between fixed option
- Save the rule
- Open it for editing
=> SUCCESS: Chosen rules are preserved
- Edit the original free-text including rule
=> SUCCESS: Rules fall back to 'None'
- Sign off :-D
TODO: A followup will add a warning about the current value and the fact that
saving the matching rule will overwrite those, with 'none'.
Sponsored-by: FIT
Signed-off-by: Mark Tompsett <mtompset at hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit 4579f1ad906b28a78c0ef7a1669b0a08138745d1
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Mon Sep 19 12:25:31 2016 -0300
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>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
commit a0af2d7d5ceb28848488c4f66e486f646341eedf
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date: Mon Sep 19 12:17:41 2016 -0300
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>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
-----------------------------------------------------------------------
Summary of changes:
C4/Matcher.pm | 75 +++++++++------
admin/matching-rules.pl | 10 +-
.../prog/en/modules/admin/matching-rules.tt | 96 +++++++++++++++----
t/Matcher.t | 99 +++++++++++++++++---
4 files changed, 218 insertions(+), 62 deletions(-)
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list