Bug 24584

Summary: Rewrite optional installation files to YAML
Product: Koha Reporter: Bernardo Gonzalez Kriegel <bgkriegel>
Component: I18N/L10NAssignee: Bernardo Gonzalez Kriegel <bgkriegel>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, jonathan.druart, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on: 24262, 24640    
Bug Blocks:    
Attachments: Bug 24584: Rewrite optional/csv_profiles to YAML
Bug 24584: Rewrite optional/marc21_holdings_coded_values to YAML
Bug 24584: Rewrite optional/marc21_relatorterms to YAML
Bug 24584: Rewrite optional/parameters to YAML
Bug 24584: Rewrite optional/patron_atributes to YAML
Bug 24584: Rewrite optional/patron_categories to YAML
Bug 24584: Rewrite optional/sample_creator_data to YAML
Bug 24584: Rewrite optional/sample_itemtypes to YAML
Bug 24584: Rewrite optional/sample_libraries to YAML
Bug 24584: Rewrite optional/sample_libraries_holidays to YAML
Bug 24584: Rewrite optional/sample_news to YAML
Bug 24584: Rewrite optional/sample_patrons to YAML
Bug 24584: Rewrite optional/sample_quotes to YAML
Bug 24584: Rewrite optional/sample_z3950_servers to YAML
Bug 24584: Rewrite optional/csv_profiles to YAML
Bug 24584: Rewrite optional/marc21_holdings_coded_values to YAML
Bug 24584: Rewrite optional/marc21_relatorterms to YAML
Bug 24584: Rewrite optional/parameters to YAML
Bug 24584: Rewrite optional/patron_atributes to YAML
Bug 24584: Rewrite optional/patron_categories to YAML
Bug 24584: Rewrite optional/sample_creator_data to YAML
Bug 24584: Rewrite optional/sample_itemtypes to YAML
Bug 24584: Rewrite optional/sample_libraries to YAML
Bug 24584: Rewrite optional/sample_libraries_holidays to YAML
Bug 24584: Rewrite optional/sample_news to YAML
Bug 24584: Rewrite optional/sample_patrons to YAML
Bug 24584: Rewrite optional/sample_quotes to YAML
Bug 24584: Rewrite optional/sample_z3950_servers to YAML
Bug 24584: Rewrite optional/csv_profiles to YAML
Bug 24584: Rewrite optional/marc21_holdings_coded_values to YAML
Bug 24584: Rewrite optional/marc21_relatorterms to YAML
Bug 24584: Rewrite optional/parameters to YAML
Bug 24584: Rewrite optional/patron_atributes to YAML
Bug 24584: Rewrite optional/patron_categories to YAML
Bug 24584: Rewrite optional/sample_creator_data to YAML
Bug 24584: Rewrite optional/sample_itemtypes to YAML
Bug 24584: Rewrite optional/sample_libraries to YAML
Bug 24584: Rewrite optional/sample_libraries_holidays to YAML
Bug 24584: Rewrite optional/sample_news to YAML
Bug 24584: Rewrite optional/sample_patrons to YAML
Bug 24584: Rewrite optional/sample_quotes to YAML
Bug 24584: Rewrite optional/sample_z3950_servers to YAML

Description Bernardo Gonzalez Kriegel 2020-02-04 23:53:46 UTC
A complete rewrite of optional instalation files from SQL to YAML is presented, one patch for each file, the result could be squashed.

The goal is to allow the translation of the installation files
Comment 1 Bernardo Gonzalez Kriegel 2020-02-05 12:59:48 UTC
Created attachment 98464 [details] [review]
Bug 24584: Rewrite optional/csv_profiles to YAML

YAML version of optional csv_profiles.

To test:
1) Do a clean install with optional data,
   dump table export_format, reserve.

2) Apply this patch and it's dependencies

3) Do a clean install, dump again and compare
   No major differences expected

4) Try translation
  a) Go to misc/translator
  b) create files for a new language
     ./translate create xx-YY
  c) Check new file po/xx-YY-instaler.po
     Verify strings from this file.
  d) Install new language
     ./translate install xx-YY
  e) Try clean install with new files
Comment 2 Bernardo Gonzalez Kriegel 2020-02-05 12:59:55 UTC
Created attachment 98465 [details] [review]
Bug 24584: Rewrite optional/marc21_holdings_coded_values to YAML

YAML version of optional marc21_holdings_coded_values

To test:
1) Same test plan of first patch, only check table
   authorised_values
Comment 3 Bernardo Gonzalez Kriegel 2020-02-05 13:00:02 UTC
Created attachment 98466 [details] [review]
Bug 24584: Rewrite optional/marc21_relatorterms to YAML

YAML version of optional marc21_relatorterms

To test:
1) Same test plan of first patch, only check table
   authorised_values
Comment 4 Bernardo Gonzalez Kriegel 2020-02-05 13:00:09 UTC
Created attachment 98467 [details] [review]
Bug 24584: Rewrite optional/parameters to YAML

YAML version of optional parameters

To test:
1) Same test plan of first patch, only check table
   currency
Comment 5 Bernardo Gonzalez Kriegel 2020-02-05 13:00:17 UTC
Created attachment 98468 [details] [review]
Bug 24584: Rewrite optional/patron_atributes to YAML

YAML version of optional patron_atributes

To test:
1) Same test plan of first patch, only check table
   borrower_attribute_types
Comment 6 Bernardo Gonzalez Kriegel 2020-02-05 13:00:25 UTC
Created attachment 98469 [details] [review]
Bug 24584: Rewrite optional/patron_categories to YAML

YAML version of optional patron_categories

To test:
1) Same test plan of first patch, only check table
   categories
Comment 7 Bernardo Gonzalez Kriegel 2020-02-05 13:00:35 UTC
Created attachment 98470 [details] [review]
Bug 24584: Rewrite optional/sample_creator_data to YAML

YAML version of optional sample_creator_data

To test:
1) Same test plan of first patch, only check tables
   creator_layouts, creator_templates and printers_profile
Comment 8 Bernardo Gonzalez Kriegel 2020-02-05 13:00:47 UTC
Created attachment 98471 [details] [review]
Bug 24584: Rewrite optional/sample_itemtypes to YAML

YAML version of optional sample_itemtypes

To test:
1) Same test plan of first patch, only check table
   itemtypes
Comment 9 Bernardo Gonzalez Kriegel 2020-02-05 13:00:58 UTC
Created attachment 98472 [details] [review]
Bug 24584: Rewrite optional/sample_libraries to YAML

YAML version of optional sample_libraries

To test:
1) Same test plan of first patch, only check table
   branches
Comment 10 Bernardo Gonzalez Kriegel 2020-02-05 13:01:09 UTC
Created attachment 98473 [details] [review]
Bug 24584: Rewrite optional/sample_libraries_holidays to YAML

YAML version of optional sample_libraries_holidays

To test:
1) Same test plan of first patch, only check table
   repeatable_holidays
Comment 11 Bernardo Gonzalez Kriegel 2020-02-05 13:01:19 UTC
Created attachment 98474 [details] [review]
Bug 24584: Rewrite optional/sample_news to YAML

YAML version of optional sample_news

To test:
1) Same test plan of first patch, only check table
   opac_news
Comment 12 Bernardo Gonzalez Kriegel 2020-02-05 13:01:27 UTC
Created attachment 98475 [details] [review]
Bug 24584: Rewrite optional/sample_patrons to YAML

YAML version of optional sample_patrons

To test:
1) Same test plan of first patch, only check table
   borrowers
Comment 13 Bernardo Gonzalez Kriegel 2020-02-05 13:01:34 UTC
Created attachment 98476 [details] [review]
Bug 24584: Rewrite optional/sample_quotes to YAML

YAML version of optional sample_quotes

To test:
1) Same test plan of first patch, only check table
   quotes
Comment 14 Bernardo Gonzalez Kriegel 2020-02-05 13:01:40 UTC
Created attachment 98477 [details] [review]
Bug 24584: Rewrite optional/sample_z3950_servers to YAML

YAML version of optional sample_z3950_servers

To test:
1) Same test plan of first patch, only check table
   z3950servers
Comment 15 Jonathan Druart 2020-02-12 10:37:27 UTC
(In reply to Bernardo Gonzalez Kriegel from comment #13)
> Created attachment 98476 [details] [review] [review]
> Bug 24584: Rewrite optional/sample_quotes to YAML
> 
> YAML version of optional sample_quotes
> 
> To test:
> 1) Same test plan of first patch, only check table
>    quotes

I am getting an error with sample_quotes.yml

DBD::mysql::st execute failed: Field 'timestamp' doesn't have a default value at /kohadevbox/koha/C4/Installer.pm line 502.

As it is the only one I think we should fix it at DB level ('timestamp' should be set to the current timestamp)
Comment 16 Jonathan Druart 2020-02-12 10:43:35 UTC
(In reply to Jonathan Druart from comment #15)
> (In reply to Bernardo Gonzalez Kriegel from comment #13)
> > Created attachment 98476 [details] [review] [review] [review]
> > Bug 24584: Rewrite optional/sample_quotes to YAML
> > 
> > YAML version of optional sample_quotes
> > 
> > To test:
> > 1) Same test plan of first patch, only check table
> >    quotes
> 
> I am getting an error with sample_quotes.yml
> 
> DBD::mysql::st execute failed: Field 'timestamp' doesn't have a default
> value at /kohadevbox/koha/C4/Installer.pm line 502.
> 
> As it is the only one I think we should fix it at DB level ('timestamp'
> should be set to the current timestamp)

See bug 24640.
Comment 17 Martin Renvoize 2020-02-21 16:39:23 UTC
Created attachment 99402 [details] [review]
Bug 24584: Rewrite optional/csv_profiles to YAML

YAML version of optional csv_profiles.

To test:
1) Do a clean install with optional data,
   dump table export_format, reserve.

2) Apply this patch and it's dependencies

3) Do a clean install, dump again and compare
   No major differences expected

4) Try translation
  a) Go to misc/translator
  b) create files for a new language
     ./translate create xx-YY
  c) Check new file po/xx-YY-instaler.po
     Verify strings from this file.
  d) Install new language
     ./translate install xx-YY
  e) Try clean install with new files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 18 Martin Renvoize 2020-02-21 16:39:26 UTC
Created attachment 99403 [details] [review]
Bug 24584: Rewrite optional/marc21_holdings_coded_values to YAML

YAML version of optional marc21_holdings_coded_values

To test:
1) Same test plan of first patch, only check table
   authorised_values

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 19 Martin Renvoize 2020-02-21 16:39:30 UTC
Created attachment 99404 [details] [review]
Bug 24584: Rewrite optional/marc21_relatorterms to YAML

YAML version of optional marc21_relatorterms

To test:
1) Same test plan of first patch, only check table
   authorised_values

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 20 Martin Renvoize 2020-02-21 16:39:33 UTC
Created attachment 99405 [details] [review]
Bug 24584: Rewrite optional/parameters to YAML

YAML version of optional parameters

To test:
1) Same test plan of first patch, only check table
   currency

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 21 Martin Renvoize 2020-02-21 16:39:36 UTC
Created attachment 99406 [details] [review]
Bug 24584: Rewrite optional/patron_atributes to YAML

YAML version of optional patron_atributes

To test:
1) Same test plan of first patch, only check table
   borrower_attribute_types

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 22 Martin Renvoize 2020-02-21 16:39:39 UTC
Created attachment 99407 [details] [review]
Bug 24584: Rewrite optional/patron_categories to YAML

YAML version of optional patron_categories

To test:
1) Same test plan of first patch, only check table
   categories

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 23 Martin Renvoize 2020-02-21 16:39:42 UTC
Created attachment 99408 [details] [review]
Bug 24584: Rewrite optional/sample_creator_data to YAML

YAML version of optional sample_creator_data

To test:
1) Same test plan of first patch, only check tables
   creator_layouts, creator_templates and printers_profile

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 24 Martin Renvoize 2020-02-21 16:39:45 UTC
Created attachment 99409 [details] [review]
Bug 24584: Rewrite optional/sample_itemtypes to YAML

YAML version of optional sample_itemtypes

To test:
1) Same test plan of first patch, only check table
   itemtypes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Martin Renvoize 2020-02-21 16:39:48 UTC
Created attachment 99410 [details] [review]
Bug 24584: Rewrite optional/sample_libraries to YAML

YAML version of optional sample_libraries

To test:
1) Same test plan of first patch, only check table
   branches

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 26 Martin Renvoize 2020-02-21 16:39:51 UTC
Created attachment 99411 [details] [review]
Bug 24584: Rewrite optional/sample_libraries_holidays to YAML

YAML version of optional sample_libraries_holidays

To test:
1) Same test plan of first patch, only check table
   repeatable_holidays

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 27 Martin Renvoize 2020-02-21 16:39:54 UTC
Created attachment 99412 [details] [review]
Bug 24584: Rewrite optional/sample_news to YAML

YAML version of optional sample_news

To test:
1) Same test plan of first patch, only check table
   opac_news

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 28 Martin Renvoize 2020-02-21 16:39:57 UTC
Created attachment 99413 [details] [review]
Bug 24584: Rewrite optional/sample_patrons to YAML

YAML version of optional sample_patrons

To test:
1) Same test plan of first patch, only check table
   borrowers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 29 Martin Renvoize 2020-02-21 16:40:01 UTC
Created attachment 99414 [details] [review]
Bug 24584: Rewrite optional/sample_quotes to YAML

YAML version of optional sample_quotes

To test:
1) Same test plan of first patch, only check table
   quotes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 30 Martin Renvoize 2020-02-21 16:40:04 UTC
Created attachment 99415 [details] [review]
Bug 24584: Rewrite optional/sample_z3950_servers to YAML

YAML version of optional sample_z3950_servers

To test:
1) Same test plan of first patch, only check table
   z3950servers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 31 Martin Renvoize 2020-02-21 16:40:23 UTC
Works well for me.. Signing off
Comment 32 Jonathan Druart 2020-03-09 12:20:45 UTC
Created attachment 100352 [details] [review]
Bug 24584: Rewrite optional/csv_profiles to YAML

YAML version of optional csv_profiles.

To test:
1) Do a clean install with optional data,
   dump table export_format, reserve.

2) Apply this patch and it's dependencies

3) Do a clean install, dump again and compare
   No major differences expected

4) Try translation
  a) Go to misc/translator
  b) create files for a new language
     ./translate create xx-YY
  c) Check new file po/xx-YY-instaler.po
     Verify strings from this file.
  d) Install new language
     ./translate install xx-YY
  e) Try clean install with new files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 33 Jonathan Druart 2020-03-09 12:20:49 UTC
Created attachment 100353 [details] [review]
Bug 24584: Rewrite optional/marc21_holdings_coded_values to YAML

YAML version of optional marc21_holdings_coded_values

To test:
1) Same test plan of first patch, only check table
   authorised_values

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 34 Jonathan Druart 2020-03-09 12:20:54 UTC
Created attachment 100354 [details] [review]
Bug 24584: Rewrite optional/marc21_relatorterms to YAML

YAML version of optional marc21_relatorterms

To test:
1) Same test plan of first patch, only check table
   authorised_values

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 35 Jonathan Druart 2020-03-09 12:20:57 UTC
Created attachment 100355 [details] [review]
Bug 24584: Rewrite optional/parameters to YAML

YAML version of optional parameters

To test:
1) Same test plan of first patch, only check table
   currency

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 36 Jonathan Druart 2020-03-09 12:21:01 UTC
Created attachment 100356 [details] [review]
Bug 24584: Rewrite optional/patron_atributes to YAML

YAML version of optional patron_atributes

To test:
1) Same test plan of first patch, only check table
   borrower_attribute_types

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 37 Jonathan Druart 2020-03-09 12:21:05 UTC
Created attachment 100357 [details] [review]
Bug 24584: Rewrite optional/patron_categories to YAML

YAML version of optional patron_categories

To test:
1) Same test plan of first patch, only check table
   categories

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 38 Jonathan Druart 2020-03-09 12:21:09 UTC
Created attachment 100358 [details] [review]
Bug 24584: Rewrite optional/sample_creator_data to YAML

YAML version of optional sample_creator_data

To test:
1) Same test plan of first patch, only check tables
   creator_layouts, creator_templates and printers_profile

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 39 Jonathan Druart 2020-03-09 12:21:13 UTC
Created attachment 100359 [details] [review]
Bug 24584: Rewrite optional/sample_itemtypes to YAML

YAML version of optional sample_itemtypes

To test:
1) Same test plan of first patch, only check table
   itemtypes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 40 Jonathan Druart 2020-03-09 12:21:17 UTC
Created attachment 100360 [details] [review]
Bug 24584: Rewrite optional/sample_libraries to YAML

YAML version of optional sample_libraries

To test:
1) Same test plan of first patch, only check table
   branches

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 41 Jonathan Druart 2020-03-09 12:21:20 UTC
Created attachment 100361 [details] [review]
Bug 24584: Rewrite optional/sample_libraries_holidays to YAML

YAML version of optional sample_libraries_holidays

To test:
1) Same test plan of first patch, only check table
   repeatable_holidays

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 42 Jonathan Druart 2020-03-09 12:21:24 UTC
Created attachment 100362 [details] [review]
Bug 24584: Rewrite optional/sample_news to YAML

YAML version of optional sample_news

To test:
1) Same test plan of first patch, only check table
   opac_news

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 43 Jonathan Druart 2020-03-09 12:21:28 UTC
Created attachment 100363 [details] [review]
Bug 24584: Rewrite optional/sample_patrons to YAML

YAML version of optional sample_patrons

To test:
1) Same test plan of first patch, only check table
   borrowers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 44 Jonathan Druart 2020-03-09 12:21:33 UTC
Created attachment 100364 [details] [review]
Bug 24584: Rewrite optional/sample_quotes to YAML

YAML version of optional sample_quotes

To test:
1) Same test plan of first patch, only check table
   quotes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 45 Jonathan Druart 2020-03-09 12:21:37 UTC
Created attachment 100365 [details] [review]
Bug 24584: Rewrite optional/sample_z3950_servers to YAML

YAML version of optional sample_z3950_servers

To test:
1) Same test plan of first patch, only check table
   z3950servers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 46 Martin Renvoize 2020-03-09 14:12:36 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 47 Joy Nelson 2020-04-01 22:33:49 UTC
enhancement not backported to 19.11.x