Bug 18446 - Test to ensure a system preference in .pref file also exists in sysprefs.sql
Summary: Test to ensure a system preference in .pref file also exists in sysprefs.sql
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-18 14:35 UTC by Lari Taskula
Modified: 2020-01-11 22:36 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18446: Compare preferences in .pref files to sysprefs.sql (2.05 KB, patch)
2017-04-18 14:38 UTC, Lari Taskula
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2017-04-18 14:35:09 UTC
Extend t/db_dependent/check_sysprefs.t to read preferences from .pref files in order to check that they are also defined in installer/data/mysql/sysprefs.sql.
Comment 1 Lari Taskula 2017-04-18 14:38:22 UTC
Created attachment 62298 [details] [review]
Bug 18446: Compare preferences in .pref files to sysprefs.sql

This patch adds a test that reads system preferences from .pref files and checks
that they are also defined in sysprefs.sql.

To test:
1. prove t/db_dependent/check_sysprefs.t
Comment 2 Lari Taskula 2017-04-18 14:40:12 UTC
This test caught the following preferences:

ArticleRequestsMandatoryFieldsItemOnly, 
HoldsInNoissuesCharge, 
NoRenewalBeforePrecision, 
OPACPopupAuthorsSearch, 
OPACPrivacy, 
OPACSuggestionMandatoryFields, 
OpacGroupResults, 
ReplytoDefault, 
SelfCheckoutByLogin, 
TalkingTechItivaPhoneNotification, 
marcflavour

Add them to sysprefs.sql to make this test pass.
Comment 3 Marcel de Rooy 2017-04-18 14:59:52 UTC
There are a few exceptions like marcflavour
Comment 4 Marcel de Rooy 2017-04-18 15:00:19 UTC
(In reply to Marcel de Rooy from comment #3)
> There are a few exceptions like marcflavour

Should be filled by the user in the web installer.
Comment 5 Katrin Fischer 2017-05-01 13:02:05 UTC
I think before this can go in, we need 2 things:
- Exclude marcflavour as it is added and set by the web installer
- Write a patch to add the missing preferences to syspref.sql and maybe also have an atomicupdate checking for their existence and adding when needed to get to a clean state.