Bug 11562 - QA: the sysprefs.sql is not correctly sorted
Summary: QA: the sysprefs.sql is not correctly sorted
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-15 15:27 UTC by Jonathan Druart
Modified: 2014-12-07 20:05 UTC (History)
2 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:


Attachments
Bug 11562: sysprefs.sql is not correctly sorted. (2.01 KB, patch)
2014-01-15 15:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED OFF] Bug 11562: sysprefs.sql is not correctly sorted. (3.04 KB, patch)
2014-02-18 18:00 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 11562: sysprefs.sql is not correctly sorted. (3.08 KB, patch)
2014-02-21 13:46 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-01-15 15:27:43 UTC

    
Comment 1 Jonathan Druart 2014-01-15 15:30:29 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-01-15 15:31:49 UTC
This one needs a quick push.
Comment 3 Mark Tompsett 2014-02-18 18:00:08 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-02-21 13:46:44 UTC
Created attachment 25533 [details] [review]
Bug 11562: sysprefs.sql is not correctly sorted.

The QA tools does not manage to catch error sorting on the sysprefs.sql
file if it is already bad sorted.

This patch tidies up the sysprefs file.

TEST PLAN
---------
0) Back up your system preferences table.
1) check out master
2) Use your koha database, and then:
    DELETE FROM systempreferences;
    SOURCE ~/kohaclone/installer/data/mysql/sysprefs.sql
3) suspend your mysql client and type something similar to:
    mysql -u root -p -e 'USE kohadata;SELECT * from systempreferences ORDER BY Variable;' > ~/master_sysprefs
4) apply the patch
5) foreground your mysql client, and then:
    DELETE FROM systempreferences;
    SOURCE ~/kohaclone/installer/data/mysql/sysprefs.sql
6) suspend your mysql client and type something similar to:
    mysql -u root -p -e 'USE kohadata;SELECT * from systempreferences ORDER BY Variable;' > ~/11562_sysprefs
7) foreground your mysql client and quit
8) Take a diff, they should be identical
    diff ~/master_sysprefs ~/11562_sysprefs

NOTE: You can't use your own system preferences values, because
      upgrades and changed values would require a lot of time
      to compare the results.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Galen Charlton 2014-02-21 17:23:00 UTC
Pushed to master, although as you can probably see from the comment I made in the commit message, I would suggest that it is a good idea to not lose perspective on the difference between a minor convention meant to reduce the chance of merge conflicts as opposed to an actual error.

Thanks, Jonathan.
Comment 6 Jonathan Druart 2014-02-24 12:05:36 UTC
(In reply to Galen Charlton from comment #5)
> Pushed to master, although as you can probably see from the comment I made
> in the commit message, I would suggest that it is a good idea to not lose
> perspective on the difference between a minor convention meant to reduce the
> chance of merge conflicts as opposed to an actual error.

Galen,
Yes I completely agree, it is not an "error".
The (small) problem occurs when the file is already badly sorted. In this case, the qa script doesn't catch a patch introducing a line in the wrong place.
This means if a pref is added at the end of the file (as we previously did), there is no warning.
Comment 7 Fridolin Somers 2014-05-21 08:35:50 UTC
Pushed to 3.14.x, will be in 3.14.07