Bug 7411 - remove diacritics when automatically generating userid
Summary: remove diacritics when automatically generating userid
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: 3.10
Hardware: All All
: P3 normal (vote)
Assignee: Katrin Fischer
QA Contact: Paul Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-06 10:19 UTC by Sophie MEYNIEUX
Modified: 2015-12-05 16:57 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 7411 : remove diacritics from userid when generated automatically (897 bytes, patch)
2012-01-06 10:42 UTC, Sophie MEYNIEUX
Details | Diff | Splinter Review
Bug 7411: Remove diacritics from generated userid (2.15 KB, patch)
2012-06-09 17:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 7411: Remove diacritics from generated userid (2.22 KB, patch)
2012-06-09 17:37 UTC, Dobrica Pavlinusic
Details | Diff | Splinter Review
Bug 7411: Follop-up: Add Text::Unaccent to PerlDependencies.pm (950 bytes, patch)
2012-07-10 06:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 7411: Follop-up: Add Text::Unaccent to PerlDependencies.pm (1.11 KB, patch)
2012-07-12 15:52 UTC, Dobrica Pavlinusic
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie MEYNIEUX 2012-01-06 10:19:48 UTC
When userid is automatically generated from firstname and surname, diacritics should be removed because login with diacritics may results in failure
Comment 1 Sophie MEYNIEUX 2012-01-06 10:42:59 UTC Comment hidden (obsolete)
Comment 2 Sophie MEYNIEUX 2012-01-06 10:46:47 UTC
http://mantis.biblibre.com/view.php?id=7744
Comment 3 Dobrica Pavlinusic 2012-01-06 11:15:06 UTC
I'm wondering why it's using Text::Undiacritic instead of Text::Unaccent which is more popular and already packaged in Debian.
Comment 4 Magnus Enger 2012-01-06 11:38:33 UTC
Using a module that is packaged for Debian would be a good idea. If this is changed, please remember to add the package to these files: 

install_misc/debian.packages
debian/control
Comment 5 Paul Poulain 2012-02-17 14:39:13 UTC
The script devel/misc/testbugzillapatches.pl has detected that this bug does not apply anymore, so i'm marking this bug as "does not apply".

The script is supposed to handle conflicts related to updatedatabase, but no other cases of merge conflict. So the conflict may be trivial to fix.

If it happens that the patch attached does apply cleanly, please send me an email, there's something wrong in the script. It's possible, as it's a recent script.
If the patch applies does not apply as I think, please rebase and resubmit, thanks
Comment 6 Katrin Fischer 2012-06-09 16:49:55 UTC
I talked to Sophie and will try writing a patch using the module suggested by Dobrica.
Comment 7 Katrin Fischer 2012-06-09 17:17:20 UTC Comment hidden (obsolete)
Comment 8 Dobrica Pavlinusic 2012-06-09 17:37:02 UTC
Created attachment 10049 [details] [review]
Bug 7411: Remove diacritics from generated userid

Patch introduces a new module Text::Unaccent.

To test:
1) Add a new patron with diacritics in surname and first name, leave userid empty.
2) Save user and check the created userid has only the base characters and
diacritics have been removed correctly.
3) Create another user with the same surname and first name, check userid
is generated correctly.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Comment 9 Paul Poulain 2012-06-11 14:42:12 UTC
QA comment: Tiny patch that adds a dependency, but this dep could be used in other places. also adds packages dependencies
Comment 10 Paul Poulain 2012-06-11 14:43:27 UTC
This patch introduces a new dependency to fix a bug that happens rarely, I think it should be for 3.10 only, but chris, you decide
Comment 11 Marcel de Rooy 2012-06-18 07:36:09 UTC
Please add to C4::Installer::PerlDependencies
Comment 12 Katrin Fischer 2012-07-10 06:23:23 UTC Comment hidden (obsolete)
Comment 13 Dobrica Pavlinusic 2012-07-12 15:52:39 UTC
Created attachment 10800 [details] [review]
Bug 7411: Follop-up: Add Text::Unaccent to PerlDependencies.pm

Adds new dependency Text::Unaccent to PerlDependencies.pm

Module is used currently to remove diacricits from automatically
created userid (<first name>.<surname>) in the patron module.

Test scenario:
1. open About Koha > Perl modules
2. verify that Text::Unaccent is there

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Comment 14 Jonathan Druart 2012-07-13 08:41:44 UTC
Last patch marked as Passed QA
Comment 15 Paul Poulain 2012-07-13 12:24:23 UTC
Follow-up pushed (on master branch, does not apply anymore on new/bug_7411)
Comment 16 Chris Cormack 2013-04-20 10:56:33 UTC
Released in 3.10.0