Bug 26112 - Errors in marc21_authorities files for uk-UA
Summary: Errors in marc21_authorities files for uk-UA
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bohdan
QA Contact: Testopia
URL: https://gitlab.com/kfischer1/Koha/-/t...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-31 10:22 UTC by Bohdan
Modified: 2023-09-16 17:02 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
uk-UA fixed queries for default authority (267.95 KB, application/octet-stream)
2020-07-31 10:22 UTC, Bohdan
Details
Patch for uk-UA fix of authority SQL queries (75.81 KB, patch)
2020-07-31 12:23 UTC, Bohdan
Details | Diff | Splinter Review
Patch for uk-UA fix of authority SQL queries (75.81 KB, application/x-zip-compressed)
2020-07-31 12:24 UTC, Bohdan
Details
installer_uk-UA_output.txt (66.71 KB, text/plain)
2020-10-08 13:25 UTC, Jonathan Druart
Details
Fix frameworks inserts (232.70 KB, patch)
2020-10-28 12:38 UTC, Bohdan
Details | Diff | Splinter Review
Remove duplicate values (10.69 KB, patch)
2020-10-28 12:40 UTC, Bohdan
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bohdan 2020-07-31 10:22:51 UTC
Created attachment 107630 [details]
uk-UA fixed queries for default authority

Upon fresh install when I choose to add authorities, the following error shows near every authorities file

 install.pl: DBD::mysql::st execute failed: Incorrect integer value: '' for column `koha_sql`.`auth_tag_structure`.`repeatable` at row 1

After completing install, I tried executing those SQL commands in phpmyadmin and it seems that in mandatory and repeatable columns have values '' or 1. I tried replacing those empty strings with zero and it worked.

Seems like each SQL query in those files should be checked and columns mandatory, repeatable should only have values 0 or 1 as it is type tinyint(4).
Comment 1 Bohdan 2020-07-31 12:23:22 UTC
Created attachment 107637 [details] [review]
Patch for uk-UA fix of authority SQL queries

Could not upload unzipped, got 413 nginx error for some reason
Comment 2 Bohdan 2020-07-31 12:24:50 UTC
Created attachment 107638 [details]
Patch for uk-UA fix of authority SQL queries

Could not upload as patch, got 413 error
Comment 3 Martin Renvoize 2020-09-16 16:27:06 UTC
I have uploaded a signed off patch to a branch here: https://github.com/mrenvoize/Koha/tree/bug_26112

I'm afraid I don't speak the language, but the files apply and run so I'm happy to signoff.

Thankyou for the contribution.
Comment 4 Katrin Fischer 2020-09-16 20:41:23 UTC
Replacing Martin's with my local branch - includes a tiny follow-up :)

https://gitlab.com/kfischer1/Koha/-/tree/bug_26112
Comment 5 Jonathan Druart 2020-10-08 13:24:37 UTC
I have tried a new install using uk-UA but I am getting tons of errors, attaching the output logs. Can you have a look Bohdan?
Comment 6 Jonathan Druart 2020-10-08 13:25:13 UTC
Created attachment 111377 [details]
installer_uk-UA_output.txt
Comment 7 Bohdan 2020-10-28 12:38:21 UTC
Created attachment 112637 [details] [review]
Fix frameworks inserts
Comment 8 Bohdan 2020-10-28 12:40:41 UTC
Created attachment 112638 [details] [review]
Remove duplicate values
Comment 9 Jonathan Druart 2020-11-12 10:44:37 UTC
Bohdan, I don't manage to apply your patch.
In the first zip file, there are some files that don't exist in our code base, like 
installer/data/mysql/uk-UA/marcflavour/marc21/optional/marc21_bibliographic_BKS_local.sql

Can you please provide a remote branch that I could check out locally?
Comment 10 Jonathan Druart 2020-11-12 11:23:49 UTC
(In reply to Jonathan Druart from comment #9)
> Bohdan, I don't manage to apply your patch.
> In the first zip file, there are some files that don't exist in our code
> base, like 
> installer/data/mysql/uk-UA/marcflavour/marc21/optional/
> marc21_bibliographic_BKS_local.sql
> 
> Can you please provide a remote branch that I could check out locally?

Wait, that's not true. This file exists. I am retrying.
Comment 11 Jonathan Druart 2020-11-12 11:44:39 UTC
The second patch does not apply, maybe because of the [] in the patch?
I have no idea why but I've started to apply the changes manually and found:


149   ('LANG', 'ang', 'давньоанглійська (староанглійська) (450-1100)'),
150 - ('LANG', 'ang', 'англо-саксонська'),
151 - ('LANG', 'ang', 'західносаксонсь'),

I am not sure we want to keep the first one.
I haven't check the others, but I don't think it makes sense to keep only the first one.

Can you please provide some changes to make things consistent in the second patch and attach them on this bug report on a git format-patch format, or all the patches on a remote branch.
Comment 12 Bohdan 2020-11-12 14:13:41 UTC
(In reply to Jonathan Druart from comment #11)
> The second patch does not apply, maybe because of the [] in the patch?
> I have no idea why but I've started to apply the changes manually and found:
> 
> 
> 149   ('LANG', 'ang', 'давньоанглійська (староанглійська) (450-1100)'),
> 150 - ('LANG', 'ang', 'англо-саксонська'),
> 151 - ('LANG', 'ang', 'західносаксонсь'),
> 
> I am not sure we want to keep the first one.
> I haven't check the others, but I don't think it makes sense to keep only
> the first one.
> 
> Can you please provide some changes to make things consistent in the second
> patch and attach them on this bug report on a git format-patch format, or
> all the patches on a remote branch.

From what I understand, only first value in authorised_values is shown in dropdown when cataloguing. Therefore I removed all duplicates and left those values that suit better for those codes.
Comment 13 Jonathan Druart 2020-11-12 15:40:34 UTC
Using google translate:
давньоанглійська (староанглійська) (450-1100) => Old English (Old English) (450-1100)
англо-саксонська => Anglo-Saxon
західносаксонсь => West Saxons

Why did you keep the first one? I was trying to understand if you kept the most relevant one or just the first one without judgement.
Comment 14 Bohdan 2020-11-12 15:44:33 UTC
(In reply to Jonathan Druart from comment #13)
> Using google translate:
> давньоанглійська (староанглійська) (450-1100) => Old English (Old English)
> (450-1100)
> англо-саксонська => Anglo-Saxon
> західносаксонсь => West Saxons
> 
> Why did you keep the first one? I was trying to understand if you kept the
> most relevant one or just the first one without judgement.

In this case it was just the first one.
Comment 15 Jonathan Druart 2020-11-12 16:12:41 UTC
Could you rework the last patch (to keep the most relevant entries) and make the different patches available on a remote branch?
Comment 16 Katrin Fischer 2023-09-16 17:02:49 UTC
This is invalid now that we have removed the language specific installer files for yaml/po files.