Bug 5474 - Missing sys prefs in translated sysprefs.sql
Summary: Missing sys prefs in translated sysprefs.sql
Status: CLOSED DUPLICATE of bug 5531
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: rel_3_2
Hardware: All All
: P5 - low major (vote)
Assignee: Henri-Damien LAURENT
QA Contact: Bugs List
: 6441 (view as bug list)
Depends on: 5531
  Show dependency treegraph
Reported: 2010-12-06 14:09 UTC by Katrin Fischer
Modified: 2012-10-26 00:41 UTC (History)
7 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2010-12-06 14:09:39 UTC
The translated sysprefs.sql files are missing some newer changes, because people only add changes and new parameters to en, but not to the other languages.

homeorholdingbranchreturn is missing from de-DE
Tagsmoderation is still NULL instead of 0

I looked at it-IT and other files too, the total of lines varies. I think all files need to be checked and have probably differences to en.

There is a test in directory xt/syspref.t 

ok 1 - Open reference syspref file installer/data/mysql/en/mandatory/sysprefs.sql
ok 2 - Found 250 sysprefs
ok 3 - Open translated sysprefs file installer/data/mysql/de-DE/mandatory/sysprefs.sql
ok 4 - Found 248 sysprefs
not ok 5 - No syspref to add
ok 6 - No syspref to delete
ok 7 - Open translated sysprefs file installer/data/mysql/it-IT/necessari/sysprefs.sql
ok 8 - Found 257 sysprefs
not ok 9 - No syspref to add
not ok 10 - No syspref to delete
ok 11 - Open translated sysprefs file installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
ok 12 - Found 250 sysprefs
not ok 13 - No syspref to add
not ok 14 - No syspref to delete
ok 15 - Open translated sysprefs file installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
ok 16 - Found 200 sysprefs
not ok 17 - No syspref to add
not ok 18 - No syspref to delete
ok 19 - Open translated sysprefs file installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
ok 20 - Found 200 sysprefs
not ok 21 - No syspref to add

It shows the missing system preferences, but does not catch the changed default value for TagsModeration.

Fixing all syspref.files is one option - but with the new translatable syspref editor another option would perhaps be to always use the en files.

A script to create the sql from the .pref files would probably be even better.
Comment 1 Frédéric Demians 2010-12-07 05:36:26 UTC
This has been discussed on koha-devel mailing list. For example:


The syspref SQL file is required during installation to populate
systemepreferences table with default value. It isn't needed for
anything else being replaced by .pref files which are translatable.
Table syspreferences description, type and other fields are deprecated.

When a new syspref is added -- It must be added in:

    - installer/data/mysql/en/mandatory/syspref.sql to define default
    - installer/data/mysql/updatedatabase.sql to update an existing
      installation. A DB upgrade must be done: SOMEONE should describe
      the exact procedure.
    - koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/ in the
      appropriate subdirectory and .pref file. 

When a syspref is updated:
    - .pref file must be modified
    - If a default value is required:
    - If necessary, a DB update and a message to explain what has to be
      done by Koha admin concerning the new syspref.
Comment 2 Fridolin Somers 2010-12-10 09:47:37 UTC
HomeOrHoldingBranchReturn is also missing from *.pref.
This preference can't be edited.
Comment 3 dev_patches 2010-12-21 23:29:23 UTC
branch pushed wip/sysprefs_translated 
on wip/koha-biblibre.git
It removes some sysprefs used in the code though.
So maybe would need some more reconciliation with .pref and sysprefs.sql work.
Comment 4 Magnus Enger 2011-06-01 14:01:26 UTC
*** Bug 6441 has been marked as a duplicate of this bug. ***
Comment 5 Magnus Enger 2011-06-01 14:04:53 UTC
I started an RFC for less error-prone handling of sysprefs on the wiki:
Comment 6 Paul Poulain 2011-11-05 09:04:01 UTC
partial duplicate of 5531 + we changed how sysprefs work, so the problem won't happen anymore

*** This bug has been marked as a duplicate of bug 5531 ***