Bug 21651 - Force insert of notices related tables during the install process
Summary: Force insert of notices related tables during the install process
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 21639
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-24 20:02 UTC by Jonathan Druart
Modified: 2020-06-04 20:32 UTC (History)
5 users (show)

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


Attachments
Bug 21651: Remove language specific sql file for notice templates related tables (43.53 KB, patch)
2018-10-24 20:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21651: Always insert notice templates related tables (2.81 KB, patch)
2018-10-24 20:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21651: Remove language specific sql file for notice templates related tables (43.55 KB, patch)
2018-10-25 15:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21651: Always insert notice templates related tables (2.81 KB, patch)
2018-10-25 15:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Screenshot of error trace (116.86 KB, image/png)
2019-05-01 22:51 UTC, Hayley Pelham
Details
Bug 21651: Always insert notice templates related tables (2.87 KB, patch)
2019-05-03 14:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21651: Always insert notice templates related tables (2.80 KB, patch)
2019-05-03 14:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21651: Always insert notice templates related tables (2.86 KB, patch)
2019-05-05 23:38 UTC, Hayley Pelham
Details | Diff | Splinter Review
Bug 21651: Remove language specific sql file for notice templates related tables (43.61 KB, patch)
2019-05-11 13:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21651: Always insert notice templates related tables (2.92 KB, patch)
2019-05-11 13:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21651: (QA follow-up) Remove remaining obsolete file from German web installer (1.71 KB, patch)
2019-05-11 13:00 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-10-24 20:02:04 UTC
The 3 following files must be mandatory and insert during the install process:
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql

They insert data for
- message_transport_types
- message_attributes
- message_transport_type

Otherwise the notice templates (table letter) will fail.

Moreover these 3 files are identical and are put in several places (1 per language) to make the description translatable (using the related .txt file)

I would suggest to move the 3 .sql files to installer/data/mysql/mandatory, remove all the others (as well as the .txt files) and insert them without asking during the install process.
Comment 1 Jonathan Druart 2018-10-24 20:15:36 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2018-10-24 20:15:40 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2018-10-25 15:12:20 UTC
Created attachment 81174 [details] [review]
Bug 21651: Remove language specific sql file for notice templates related tables

This patch removes the 3 following files for the different languages
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql
They were all identical, only one version is kept in installer/data/mysql/mandatory

.txt files are removed as well

They inserted data for
- message_transport_types
- message_attributes
- message_transport_type
Comment 4 Jonathan Druart 2018-10-25 15:12:24 UTC
Created attachment 81175 [details] [review]
Bug 21651: Always insert notice templates related tables

The 3 following files must be mandatory and insert during the install process:
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql

They insert data for
- message_transport_types
- message_attributes
- message_transport_type

Otherwise the notice templates (table letter) will fail.

Moreover these 3 files are identical and are put in several places (1 per language)
to make the description translatable (using the related .txt file)

Test plan:
- Install Koha in English and in another language
- Select all the sample data
=> They all should be inserted correctly
Note that you cannot select/unselect the checkbox for these 3 tables
Comment 5 Liz Rea 2019-04-16 16:37:40 UTC
Hi Jonathan, 

Seems ok except for the "cannot select/unselect the checkbox for these 3 tables" - I was still able to uncheck them?


Cheers,
Liz
Comment 6 Jonathan Druart 2019-04-24 22:03:05 UTC
Hum yes, indeed. I have no idea why I added that to the commit message. Do you think we should disable the checkboxes?
If we do, we certainly we want to disable all the mandatory ones.
Comment 7 Liz Rea 2019-04-26 15:01:16 UTC
This was a thing I wanted Alex to do along with the onboarder, but translation problems hung it up. Usability wise YES 100% we should not allow mandatory ones to be unticked.

But you (or somebody) can do that on another bug if you like. :)

I'll test it again, with that not in the test plan and update the commit message if it looks ok.

Liz
Comment 8 Hayley Pelham 2019-05-01 22:51:04 UTC
Created attachment 89196 [details]
Screenshot of error trace

Hi Jonathan,

When testing this and installing all Optional data in English, I got to the end of the onboarding with no issues and then logged in which led me straight into an error trace. The issue was with DateUtils, it looked like it was an issue with the sample news items. I took a screenshot of the Error trace which I'm attaching. This didn't happen when I tried the same process on master.
Comment 9 Jonathan Druart 2019-05-03 14:24:24 UTC
Created attachment 89318 [details] [review]
Bug 21651: Always insert notice templates related tables

The 3 following files must be mandatory and insert during the install process:
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql

They insert data for
- message_transport_types
- message_attributes
- message_transport_type

Otherwise the notice templates (table letter) will fail.

Moreover these 3 files are identical and are put in several places (1 per language)
to make the description translatable (using the related .txt file)

Test plan:
- Install Koha in English and in another language
- Select all the sample data
=> They all should be inserted correctly
Note that you cannot select/unselect the checkbox for these 3 tables
Comment 10 Jonathan Druart 2019-05-03 14:26:12 UTC
Created attachment 89319 [details] [review]
Bug 21651: Always insert notice templates related tables

The 3 following files must be mandatory and insert during the install process:
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql

They insert data for
- message_transport_types
- message_attributes
- message_transport_type

Otherwise the notice templates (table letter) will fail.

Moreover these 3 files are identical and are put in several places (1 per language)
to make the description translatable (using the related .txt file)

Test plan:
- Install Koha in English and in another language
- Select all the sample data
=> They all should be inserted correctly
Comment 11 Jonathan Druart 2019-05-03 14:27:18 UTC
I am terribly sorry, Hayley, the path to sysprefs.sql was wrong!
It's now fixed.
Comment 12 Jonathan Druart 2019-05-03 14:40:50 UTC
(In reply to Liz Rea from comment #7)
> This was a thing I wanted Alex to do along with the onboarder, but
> translation problems hung it up. Usability wise YES 100% we should not allow
> mandatory ones to be unticked.
> 
> But you (or somebody) can do that on another bug if you like. :)

Thanks for the answer, Liz.
I have opened bug 22840.
Comment 13 Hayley Pelham 2019-05-05 23:38:10 UTC
Created attachment 89367 [details] [review]
Bug 21651: Always insert notice templates related tables

The 3 following files must be mandatory and insert during the install process:
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql

They insert data for
- message_transport_types
- message_attributes
- message_transport_type

Otherwise the notice templates (table letter) will fail.

Moreover these 3 files are identical and are put in several places (1 per language)
to make the description translatable (using the related .txt file)

Test plan:
- Install Koha in English and in another language
- Select all the sample data
=> They all should be inserted correctly

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Comment 14 Katrin Fischer 2019-05-11 13:00:34 UTC
Created attachment 89599 [details] [review]
Bug 21651: Remove language specific sql file for notice templates related tables

This patch removes the 3 following files for the different languages
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql
They were all identical, only one version is kept in installer/data/mysql/mandatory

.txt files are removed as well

They inserted data for
- message_transport_types
- message_attributes
- message_transport_type

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2019-05-11 13:00:38 UTC
Created attachment 89600 [details] [review]
Bug 21651: Always insert notice templates related tables

The 3 following files must be mandatory and insert during the install process:
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql

They insert data for
- message_transport_types
- message_attributes
- message_transport_type

Otherwise the notice templates (table letter) will fail.

Moreover these 3 files are identical and are put in several places (1 per language)
to make the description translatable (using the related .txt file)

Test plan:
- Install Koha in English and in another language
- Select all the sample data
=> They all should be inserted correctly

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2019-05-11 13:00:43 UTC
Created attachment 89601 [details] [review]
Bug 21651: (QA follow-up) Remove remaining obsolete file from German web installer

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Nick Clemens 2019-05-15 17:04:22 UTC
Awesome work all!

Pushed to master for 19.05
Comment 18 Martin Renvoize 2019-05-30 19:27:38 UTC
Pushed to 18.11.x for 18.11.06
Comment 19 Liz Rea 2019-06-18 18:30:32 UTC
I'm declining this one for 18.05 because hopefully new Koha users won't be clean installing, and I don't want to take the backport risk.

Cheers,
Liz