Bug 23199

Summary: Koha::Patron->store and uppercasesurname syspref
Product: Koha Reporter: Arthur Suzuki <arthur.suzuki>
Component: PatronsAssignee: Arthur Suzuki <arthur.suzuki>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle.m.hall, lucas, m.de.rooy, mtompset
Version: master   
Hardware: All   
OS: All   
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
Bug Depends on:    
Bug Blocks: 23688    
Attachments: Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Bug 23199 : move uppercasesurname from memberentry.pl to Koha::Patron
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Bug 23199: Added tests for Koha::Patron
Bug 23199: (follow-up) Fix tab/space issues
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Bug 23199: Added tests for Koha::Patron
Bug 23199: (follow-up) Fix tab/space issues

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 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 2019-08-02 20:36:22 UTC
backported to 18.11.x for 18.11.09