Bug 23199 - Koha::Patron->store and uppercasesurname syspref
Summary: Koha::Patron->store and uppercasesurname syspref
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Arthur Suzuki
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 23688
  Show dependency treegraph
 
Reported: 2019-06-25 09:05 UTC by Arthur Suzuki
Modified: 2020-06-04 20:32 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03,18.11.09
Circulation function:


Attachments
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref (1.07 KB, patch)
2019-06-25 09:33 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 23199 : move uppercasesurname from memberentry.pl to Koha::Patron (1.91 KB, patch)
2019-06-25 09:51 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref (1.64 KB, patch)
2019-06-25 13:03 UTC, Arthur Suzuki
Details | Diff | Splinter Review
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref (1.69 KB, patch)
2019-07-02 05:07 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23199: Added tests for Koha::Patron (1.49 KB, patch)
2019-07-02 05:07 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23199: (follow-up) Fix tab/space issues (888 bytes, patch)
2019-07-02 05:07 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref (1.80 KB, patch)
2019-07-05 06:56 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23199: Added tests for Koha::Patron (1.58 KB, patch)
2019-07-05 06:56 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23199: (follow-up) Fix tab/space issues (995 bytes, patch)
2019-07-05 06:56 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Suzuki 2019-06-25 09:05:22 UTC
When uppercase surname syspref is set, surname is transformed to uppercase when creating user from admin interface but not when user is created through API or with a script.

Moving this transform to Koha::Patron->store method would solve this issue.
Comment 1 Arthur Suzuki 2019-06-25 09:33:11 UTC
Created attachment 90982 [details] [review]
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref

Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase
Comment 2 Arthur Suzuki 2019-06-25 09:51:26 UTC
Created attachment 90983 [details] [review]
Bug 23199 : move uppercasesurname from memberentry.pl to Koha::Patron

In memberentry.pl uppercasesurname transform is applied both on patron
creation and update (save || insert).

Therefore I moved the transformation a bit earlier in Koha::Patron so
that it's apply both in "AddMember" and "ModMember"

Same test plan applies
Comment 3 Arthur Suzuki 2019-06-25 13:03:33 UTC
Created attachment 90996 [details] [review]
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref

Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase
Comment 4 Mark Tompsett 2019-07-02 02:44:19 UTC
Comment on attachment 90983 [details] [review]
Bug 23199 : move uppercasesurname from memberentry.pl to Koha::Patron

I believe the second patch is a rebase.
Comment 5 Mark Tompsett 2019-07-02 05:07:15 UTC
Created attachment 91170 [details] [review]
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref

Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 6 Mark Tompsett 2019-07-02 05:07:17 UTC
Created attachment 91171 [details] [review]
Bug 23199: Added tests for Koha::Patron

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 7 Mark Tompsett 2019-07-02 05:07:19 UTC
Created attachment 91172 [details] [review]
Bug 23199: (follow-up) Fix tab/space issues

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 8 Marcel de Rooy 2019-07-05 06:56:24 UTC
Created attachment 91318 [details] [review]
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref

Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2019-07-05 06:56:29 UTC
Created attachment 91319 [details] [review]
Bug 23199: Added tests for Koha::Patron

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2019-07-05 06:56:33 UTC
Created attachment 91320 [details] [review]
Bug 23199: (follow-up) Fix tab/space issues

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Martin Renvoize (ashimema) 2019-07-05 07:45:42 UTC
Nice work!

Pushed to master for 19.11.00
Comment 12 Fridolin Somers 2019-07-25 13:54:03 UTC
Pushed to 19.05.x for 19.05.03
Comment 13 Lucas Gass (lukeg) 2019-08-02 20:36:22 UTC
backported to 18.11.x for 18.11.09