[Koha-bugs] [Bug 17661] Differences in field ending (whitespace, punctuation) cause duplicate facets

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Jan 12 11:02:15 CET 2020


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #9 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Hi Nick,

I thouhgt it would be very nice to revive this bug and looked at your WIP
patch. I think you were on the right track there, but I'd like to suggest some
changes to the regex.

You got:
$data =~ s/[.\-,]$//; 

I've tested with authors and made some changes on my data:

Without patch:

Aristophanes,
Aristophanes.
Beckett, Samuel,
Celan, Paul.
Date, C. J. 

With patch:

Aristophanes.
Beckett Samuel,
Celan Paul.
Date C. J. 

1) Your regex always removes the first occurence, but we need the last.
2) . is not removed as it's not escaped in the regex (I think).
2) In case of "Date, C. J." we don't want the last, when it's preceded by a
capital letter (very likely to be an initial).

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


More information about the Koha-bugs mailing list