Bug 22024 - Update translated web installer files with new class splitting rules
Summary: Update translated web installer files with new class splitting rules
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Target Milestone: ---
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 15836
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-18 21:19 UTC by Katrin Fischer
Modified: 2019-02-25 06:53 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22024 - Update translated web installer files with new class splitting rules (45.36 KB, patch)
2018-12-18 21:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22024: Correct new installations with missing data (3.74 KB, patch)
2018-12-18 22:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22024: Update translated web installer files with new class splitting rules (45.48 KB, patch)
2018-12-19 18:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22024: Correct new installations with missing data (3.81 KB, patch)
2018-12-19 18:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22024: Fix number of fields in uk-UA (3.69 KB, patch)
2018-12-19 18:05 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-12-18 21:19:00 UTC

    
Comment 1 Katrin Fischer 2018-12-18 21:20:11 UTC
When adding the new splitting rules for classification source with bug 15836, we missed updating the translated installers. 

I will provide a patch for the SQL file. We will need another with a database update as new installations might have been created with missing set up.
Comment 2 Katrin Fischer 2018-12-18 21:24:00 UTC
Created attachment 83374 [details] [review]
Bug 22024 - Update translated web installer files with new class splitting rules

When adding the new splitting rules for classification sources
with bug 15836, we missed updating the translated installers.

This has the danger of data missing for new installations already
set up with 18.11.

This patch corrects the installer files.

To test:
- Verify the class_sources.sql installs correctly for all languages
Comment 3 Katrin Fischer 2018-12-18 22:25:18 UTC
Created attachment 83375 [details] [review]
Bug 22024: Correct new installations with missing data

For a new installation the data in the class_* will be
missing as class_sources.sql couldn't be executed. It will
fail with:

DBD::mysql::st execute failed: Cannot add or update a child row:
a foreign key constraint fails (`koha_kohadev`.`class_sources`,
CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`)
REFERENCES `class_split_rules` (`class_split_rule`)) at /usr/share/perl5/DBIx/RunSQL.pm line 273.

As this might have been missed and the web installer can still
be completed, this patch checks for the tables being empty and
adds the default data if they are.

To test:
- Without the patch
- Run the de-DE or another translated installer
- Verify the error is shown
- Complete the installer
- Verify class_sources table is empty
- Apply patches
- Run the database update
- Verify data classification sources, filing rules, and
  slitting rules are now complete
Comment 4 Jonathan Druart 2018-12-19 18:05:24 UTC
Created attachment 83396 [details] [review]
Bug 22024: Update translated web installer files with new class splitting rules

When adding the new splitting rules for classification sources
with bug 15836, we missed updating the translated installers.

This has the danger of data missing for new installations already
set up with 18.11.

This patch corrects the installer files.

To test:
- Verify the class_sources.sql installs correctly for all languages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2018-12-19 18:05:29 UTC
Created attachment 83397 [details] [review]
Bug 22024: Correct new installations with missing data

For a new installation the data in the class_* will be
missing as class_sources.sql couldn't be executed. It will
fail with:

DBD::mysql::st execute failed: Cannot add or update a child row:
a foreign key constraint fails (`koha_kohadev`.`class_sources`,
CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`)
REFERENCES `class_split_rules` (`class_split_rule`)) at /usr/share/perl5/DBIx/RunSQL.pm line 273.

As this might have been missed and the web installer can still
be completed, this patch checks for the tables being empty and
adds the default data if they are.

To test:
- Without the patch
- Run the de-DE or another translated installer
- Verify the error is shown
- Complete the installer
- Verify class_sources table is empty
- Apply patches
- Run the database update
- Verify data classification sources, filing rules, and
  slitting rules are now complete

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2018-12-19 18:05:34 UTC
Created attachment 83398 [details] [review]
Bug 22024: Fix number of fields in uk-UA

ERROR 1136 (21S01) at line 23: Column count doesn't match value count at row 22

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2018-12-19 18:05:54 UTC
Skipping QA.
Comment 8 Katrin Fischer 2018-12-19 23:20:24 UTC
Thx for catching the missing ones and the sign-off!
Comment 9 Nick Clemens 2018-12-20 00:56:22 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2018-12-20 09:54:53 UTC
Pushed to 18.11.x for 18.11.01
Comment 11 Lucas Gass 2018-12-28 21:23:47 UTC
15836 dependency is not in 18.05, wont backport