Bug 19788

Summary: Case sensitivity is not preserved when creating local system preferences
Product: Koha Reporter: Frédéric Demians <f.demians>
Component: System AdministrationAssignee: Frédéric Demians <f.demians>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, kyle, m.de.rooy, nick
Version: Main   
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:
Circulation function:
Attachments: Bug 19788 Local preference with uppercase
Bug 19788 Local preference with uppercase
Bug 19788: Add a test
Bug 19788 Local preference with uppercase
Bug 19788: Add a test

Description Frédéric Demians 2017-12-11 07:25:24 UTC
In Administration > System preferences, when adding a local preference, the 'variable' name is transformed in lowercase.
Comment 1 Frédéric Demians 2017-12-11 07:32:41 UTC
Created attachment 69675 [details] [review]
Bug 19788 Local preference with uppercase

Fix a bug tranforming new local preference variable name in lowercase.

TO TEST:

1. Admin > System preferences > Local use
2. Button New preference. Fill variable field with 'TESTfoo'. Click
   Save.
3. The new variable is named: 'testfoo'.
4. Apply the patch.
5. Button New preference. Fill variable field with 'TESTfoo2'. Click
   Save.
6. The new variable is properly named: 'TESTfoo2'.
Comment 2 Claire Gravely 2017-12-11 08:12:03 UTC
Created attachment 69676 [details] [review]
Bug 19788 Local preference with uppercase

Fix a bug tranforming new local preference variable name in lowercase.

TO TEST:

1. Admin > System preferences > Local use
2. Button New preference. Fill variable field with 'TESTfoo'. Click
   Save.
3. The new variable is named: 'testfoo'.
4. Apply the patch.
5. Button New preference. Fill variable field with 'TESTfoo2'. Click
   Save.
6. The new variable is properly named: 'TESTfoo2'.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 3 Marcel de Rooy 2017-12-15 11:06:31 UTC
Who can provide me some more guarantee that we do not break things with this patch? Did you run all tests? Can you add a test?
Comment 4 Jonathan Druart 2017-12-19 14:56:39 UTC
Created attachment 69912 [details] [review]
Bug 19788: Add a test
Comment 5 Jonathan Druart 2017-12-19 15:02:45 UTC
This patch makes sense to me.
Comment 6 Kyle M Hall (khall) 2017-12-21 14:56:42 UTC
Created attachment 70041 [details] [review]
Bug 19788 Local preference with uppercase

Fix a bug tranforming new local preference variable name in lowercase.

TO TEST:

1. Admin > System preferences > Local use
2. Button New preference. Fill variable field with 'TESTfoo'. Click
   Save.
3. The new variable is named: 'testfoo'.
4. Apply the patch.
5. Button New preference. Fill variable field with 'TESTfoo2'. Click
   Save.
6. The new variable is properly named: 'TESTfoo2'.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall (khall) 2017-12-21 14:56:49 UTC
Created attachment 70042 [details] [review]
Bug 19788: Add a test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Jonathan Druart 2017-12-22 16:17:25 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 9 Nick Clemens (kidclamp) 2018-01-15 16:45:45 UTC
Awesome work all, pushed to stable for 17.11.02
Comment 10 Fridolin Somers 2018-01-19 13:23:14 UTC
Pushed to 17.05.x for v17.05.08