Bug 13149

Summary: B 11926 (HEA - Render community koha statistic usages) introduces an column count error in sysprefs.ql
Product: Koha Reporter: Olli-Antti Kivilahti <olli-antti.kivilahti>
Component: Websites, Mailing Lists, etcAssignee: Olli-Antti Kivilahti <olli-antti.kivilahti>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: bgkriegel, katrin.fischer, paola.rossi, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 11926    
Bug Blocks: 13585    
Attachments: Bug 13149 - for B 11926 (HEA - Render community koha statistic usages) introduces an column count error in sysprefs.sql
Bug 13149 - for B 11926 (HEA - Render community koha statistic usages) introduces an column count error in sysprefs.sql
Bug 13149: Fix sequence of fields in sysprefs.sql
[SIGNED-OFF] Bug 13149 - for B 11926 (HEA - Render community koha statistic usages) introduces an column count error in sysprefs.sql
[SIGNED-OFF] Bug 13149: Fix sequence of fields in sysprefs.sql
[PASSED QA] Bug 13149 - for B 11926 (HEA - Render community koha statistic usages) introduces an column count error in sysprefs.sql
[PASSED QA] Bug 13149: Fix sequence of fields in sysprefs.sql

Description Olli-Antti Kivilahti 2014-10-27 14:05:45 UTC
Because of this bug, installing Koha's default databse fails because sysprefs cannot be installed.
Comment 1 Olli-Antti Kivilahti 2014-10-27 14:12:43 UTC Comment hidden (obsolete)
Comment 2 Olli-Antti Kivilahti 2014-10-27 14:14:12 UTC
Setting severity to major, because this seriously hampers newcomers from enjoying their seamless Koha experience.
Comment 3 Paola Rossi 2014-10-27 15:16:55 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-10-27 17:58:28 UTC
I feel like the patch is not complete - all UsageStats* have the wrong field order. Testing a new patch.
Comment 5 Katrin Fischer 2014-10-27 18:32:09 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2014-10-27 18:33:06 UTC
My new patch applies on top of Kivilahti's, fixing the other UsageStats* prefs.
Comment 7 Bernardo Gonzalez Kriegel 2014-10-27 19:27:14 UTC Comment hidden (obsolete)
Comment 8 Bernardo Gonzalez Kriegel 2014-10-27 19:27:21 UTC Comment hidden (obsolete)
Comment 9 Tomás Cohen Arazi 2014-10-28 13:18:01 UTC
Created attachment 32824 [details] [review]
[PASSED QA] Bug 13149 - for B 11926 (HEA - Render community koha statistic usages) introduces an column count error in sysprefs.sql

REPLICATE:

1. Create a new Koha database to your SQL Server. Set proper user permissions.
2. Change database data source definitions in koha-config.xml.
3. Run the web-installer to install a new Koha with defaults.
4. Run "SELECT * FROM systempreferences;" in your SQL Server and observe only
   3 systempreferences set.
 +--------------------------+
(( 5. mainpage.pl crashes!! ))
 +--------------------------+

AFTER THIS COMMIT:

0. Redo REPLICATE steps.
1. test phase 4 returns over 400 results.
2. test phase 5 doesn't crash.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 10 Tomás Cohen Arazi 2014-10-28 13:18:14 UTC
Created attachment 32825 [details] [review]
[PASSED QA] Bug 13149: Fix sequence of fields in sysprefs.sql

The sequence of fields in the SQL statement didn't
match correctly.

Test plan:
- Run the web installer on an empty database
- Make sure no SQL errors are shown
- Check the systempreferences table in your database,
  especially all UsageStats*
- Make sure the explanations are in explanation etc.

Alternatively:
- Save your database
- truncate systempreferences;
- Load the sql file sysprefs.sql
- Verfiy as above

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Tested creating new database, then loading kohastructure and sysprefs.sql
Without patch sysprefs fails to load, with patch loads Ok!
No koha-qa errors

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 11 Tomás Cohen Arazi 2014-10-28 13:22:20 UTC
Patches pushed to master.

Thanks Olli and Katrina
Comment 12 Olli-Antti Kivilahti 2014-10-29 07:49:49 UTC
Lol that was the fastest push to master ever.

Thank you Katrin for spotting the bug and providing a fix!
Good initiative!