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

2017-03-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

J Schmidt  changed:

   What|Removed |Added

 CC||jschm...@switchinc.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-02-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #24 from Jonathan Druart  
---
Tomas, I get the following error when I import a record using the
'Biblionumber' matching rule:

Invalid normalization routine required (Biblionumber) at
/home/vagrant/kohaclone/C4/Matcher.pm line 844., referer:
http://pro.kohadev.vm/cgi-bin/koha/tools/stage-marc-import.pl

This rule is added by the installer files as well as 'ISBN' and 'ISSN'.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-01-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

David Cook  changed:

   What|Removed |Added

 Blocks|10662   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10662
[Bug 10662] Build OAI-PMH Harvesting Client
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2017-01-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

David Cook  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=10662

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-11-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #23 from David Cook  ---
Tomas, if you have ideas about how to fix the other problems I've mentioned,
I'd be happy to hear them : ).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-11-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #22 from David Cook  ---
Unfortunately, I've discovered that this wasn't really a complete duplicate of
bug 15541...

C4::Search::SimpleSearch() performs additional query normalization which
interferes with getting correct matches (primarily with URLs).

The QueryParser should also fallback to the regular query builder in
C4::Matcher::get_matches() when there are multiple comma separated qualifiers.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-10-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Kyle M Hall  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #21 from Kyle M Hall  ---
Pushed to master for 16.11, thanks Tomas!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-10-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

David Cook  changed:

   What|Removed |Added

 Blocks||10662


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10662
[Bug 10662] Build OAI-PMH Harvesting Client
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-10-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #20 from David Cook  ---
Wooo! Go team!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #18 from Jonathan Druart  
---
Created attachment 55902
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55902=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 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Jonathan Druart  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  
---
Created attachment 55901
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55901=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 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #19 from Jonathan Druart  
---
Created attachment 55903
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55903=edit
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 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #16 from Tomás Cohen Arazi  ---
(In reply to Jonathan Druart from comment #14)
> Tomas, would not we want to eventually cumulate the different rules
> (UC+remove spaces for instance)?

Yes, i just didn't want to spend time on that until this went through QA. One
enhancement per bug!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #15 from M. Tompsett  ---
(In reply to Jonathan Druart from comment #14)
> Tomas, would not we want to eventually cumulate the different rules
> (UC+remove spaces for instance)?

Forgive me for interjecting. But, yes! That's why norms is an array and it
loops through it. Feel free to correct me if I misread the code.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

--- Comment #14 from Jonathan Druart  
---
Tomas, would not we want to eventually cumulate the different rules (UC+remove
spaces for instance)?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||k...@bywatersolutions.com

--- Comment #13 from Tomás Cohen Arazi  ---
*** Bug 14238 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

M. Tompsett  changed:

   What|Removed |Added

 CC||dc...@prosentient.com.au

--- Comment #12 from M. Tompsett  ---
*** Bug 15541 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

M. Tompsett  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off
 CC||mtomp...@hotmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

M. Tompsett  changed:

   What|Removed |Added

  Attachment #55753|0   |1
is obsolete||

--- Comment #9 from M. Tompsett  ---
Created attachment 55779
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55779=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 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

M. Tompsett  changed:

   What|Removed |Added

  Attachment #55755|0   |1
is obsolete||

--- Comment #11 from M. Tompsett  ---
Created attachment 55781
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55781=edit
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 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

M. Tompsett  changed:

   What|Removed |Added

  Attachment #55754|0   |1
is obsolete||

--- Comment #10 from M. Tompsett  ---
Created attachment 55780
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55780=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 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Depends on||17302


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17302
[Bug 17302] Add Koha::Util::Normalize for normalization functions
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Depends on||17304


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17304
[Bug 17304] C4::Matcher::_get_match_keys is not tested
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tom Misilo  changed:

   What|Removed |Added

 CC||misi...@fit.edu

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


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

2016-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #55740|0   |1
is obsolete||

--- Comment #7 from Tomás Cohen Arazi  ---
Created attachment 55754
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55754=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

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #55741|0   |1
is obsolete||

--- Comment #8 from Tomás Cohen Arazi  ---
Created attachment 55755
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55755=edit
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

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #55720|0   |1
is obsolete||

--- Comment #6 from Tomás Cohen Arazi  ---
Created attachment 55753
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55753=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

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #5 from Tomás Cohen Arazi  ---
Created attachment 55741
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55741=edit
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'.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #55721|0   |1
is obsolete||

--- Comment #4 from Tomás Cohen Arazi  ---
Created attachment 55740
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55740=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

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de,
   ||kyle.m.h...@gmail.com
   Assignee|gmcha...@gmail.com  |tomasco...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #3 from Tomás Cohen Arazi  ---
Created attachment 55721
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55721=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

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #2 from Tomás Cohen Arazi  ---
Created attachment 55720
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55720=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.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

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

2016-09-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17318

--- Comment #1 from Tomás Cohen Arazi  ---
Created attachment 55695
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55695=edit
'Normalization rule' on the UI

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/