Bug 24851 - No sample libraries for UNIMARC installations
Summary: No sample libraries for UNIMARC installations
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal with 1 vote (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-11 16:29 UTC by Jonathan Druart
Modified: 2020-04-20 00:00 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.05, 19.05.10


Attachments
Bug 24851: Insert libraries sample data for "UNIMARC" (2.68 KB, patch)
2020-03-11 17:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24851: Insert libraries sample data for "UNIMARC" (2.75 KB, patch)
2020-03-11 17:58 UTC, Jon Knight
Details | Diff | Splinter Review
Bug 24851: UNIMARC - koha-testing-docker start up (220.18 KB, text/plain)
2020-03-14 06:26 UTC, David Nind
Details
Bug 24851: Translate the .txt in French (717 bytes, patch)
2020-03-16 11:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24851: Insert libraries sample data for "UNIMARC" (2.79 KB, patch)
2020-03-16 21:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24851: Insert libraries sample data for "UNIMARC" (2.80 KB, patch)
2020-03-16 21:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24851: Translate the .txt in French (774 bytes, patch)
2020-03-16 21:11 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 2020-03-11 16:29:02 UTC
I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.
Comment 1 Jonathan Druart 2020-03-11 17:02:27 UTC
Created attachment 100590 [details] [review]
Bug 24851: Insert libraries sample data for "UNIMARC"

I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.

misc4dev will use fr-FR sample data for "UNIMARC"
This is related to https://gitlab.com/koha-community/koha-misc4dev/issues/29

Test plan:
outside your box, in koha-testing-docker (up-to-date), edit .env and set
 KOHA_MARC_FLAVOUR=unimarc
 DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/joubu/koha-misc4dev.git
 DEBUG_GIT_REPO_MISC4DEV_BRANCH=unimarc

Then start the koha container
When the misc4dev will start its job, the scripts will have the expected
data to continue.

Without this patch you will get
koha_1       | Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.

And plenty of errors will follow.

Also, the sample data used in misc4dev will use CPL
(/kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql)
Comment 2 Jon Knight 2020-03-11 17:58:17 UTC
Created attachment 100596 [details] [review]
Bug 24851: Insert libraries sample data for "UNIMARC"

I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.

misc4dev will use fr-FR sample data for "UNIMARC"
This is related to https://gitlab.com/koha-community/koha-misc4dev/issues/29

Test plan:
outside your box, in koha-testing-docker (up-to-date), edit .env and set
 KOHA_MARC_FLAVOUR=unimarc
 DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/joubu/koha-misc4dev.git
 DEBUG_GIT_REPO_MISC4DEV_BRANCH=unimarc

Then start the koha container
When the misc4dev will start its job, the scripts will have the expected
data to continue.

Without this patch you will get
koha_1       | Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.

And plenty of errors will follow.

Also, the sample data used in misc4dev will use CPL
(/kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql)

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Comment 3 David Nind 2020-03-12 09:25:05 UTC
Thanks Jonathan for doing this, and Jon for testing. It will be great to be able to test UNIMARC related bugs using koha-testing-docker!

I was trying to test this earlier, and I couldn't get it to work by following the test plan - so I'm probably doing something wrong!

What I did and the results:

1) git pull for the koha-testing-docker repository (so that is up-to-date) and  docker-compose pull so that all the images are up-to-date as well.
2) Started up, kshell, applied patch, shut down
3) Made the changes to the .env file
4) Started up koha-testing-docker
5) Get these messages during start up:

Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.
...
...
C4::Installer::load_sql returned the following errors while attempting to load /kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql:
koha_1       | DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) at /usr/share/perl5/DBIx/RunSQL.pm line 273.
koha_1       | Something went wrong loading file /kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql ([SQL ERROR]: INSERT INTO `items` ( `itemn...
.....
.....
error retrieving biblio 1 at /kohadevbox/koha/misc/migration_tools/rebuild_zebra.pl line 681.

^^^^ that message repeats - trying to retrieve all the biblio entries (number after changes)

Use of uninitialized value in string eq at /kohadevbox/koha/misc/migration_tools/rebuild_zebra.pl line 663.

^^^^ line number changes between 86, 92, and 663

6) When I go to 127.0.0.1:8081 I get the web installer

Not sure what I'm doing wrong here, but I'm sure it is something simple and obvious to you! The patch is applied, so I shouldn't be getting all the errors above!
Comment 4 Jonathan Druart 2020-03-12 10:01:49 UTC
Yes David, that's exactly the purpose of this patch here :)
I have just done a pull request on koha-misc4dev: https://gitlab.com/koha-community/koha-misc4dev/-/issues/29
Comment 5 Jonathan Druart 2020-03-12 10:10:29 UTC
Could you retry using the test plan I let on the pull request?
What you tried should have worked.
Comment 6 David Nind 2020-03-12 19:54:08 UTC
Thanks Jonathan! I'll have another go at it this evening.
Comment 7 David Nind 2020-03-14 06:26:45 UTC
Created attachment 100691 [details]
Bug 24851: UNIMARC - koha-testing-docker start up

I had another go.

Bug 24851 and Bug 24856 seem to have applied successfully, and it seems to have picked up the changes from https://gitlab.com/joubu/koha-misc4dev/-/tree/issue_29

I've attached the log of the koha-testing-docker start up - I've removed the repeating error lines at 14346 and 14385, and the insertion of reocords and authorities.

End result for me = web installer appears when you go to 127.0.0.1:8081

I'll let someone else have a go - they may be more successful in getting this working!
Comment 8 Katrin Fischer 2020-03-15 14:08:53 UTC
Only one thing here:
+++ b/installer/data/mysql/fr-FR/2-Optionel/sample_libraries.txt

I think this should be in French!
Comment 9 Jonathan Druart 2020-03-16 11:39:58 UTC
Created attachment 100736 [details] [review]
Bug 24851: Translate the .txt in French
Comment 10 Katrin Fischer 2020-03-16 21:10:17 UTC
Created attachment 100818 [details] [review]
Bug 24851: Insert libraries sample data for "UNIMARC"

I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.

misc4dev will use fr-FR sample data for "UNIMARC"
This is related to https://gitlab.com/koha-community/koha-misc4dev/issues/29

Test plan:
outside your box, in koha-testing-docker (up-to-date), edit .env and set
 KOHA_MARC_FLAVOUR=unimarc
 DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/joubu/koha-misc4dev.git
 DEBUG_GIT_REPO_MISC4DEV_BRANCH=unimarc

Then start the koha container
When the misc4dev will start its job, the scripts will have the expected
data to continue.

Without this patch you will get
koha_1       | Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.

And plenty of errors will follow.

Also, the sample data used in misc4dev will use CPL
(/kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql)

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2020-03-16 21:11:04 UTC
Created attachment 100819 [details] [review]
Bug 24851: Insert libraries sample data for "UNIMARC"

I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.

misc4dev will use fr-FR sample data for "UNIMARC"
This is related to https://gitlab.com/koha-community/koha-misc4dev/issues/29

Test plan:
outside your box, in koha-testing-docker (up-to-date), edit .env and set
 KOHA_MARC_FLAVOUR=unimarc
 DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/joubu/koha-misc4dev.git
 DEBUG_GIT_REPO_MISC4DEV_BRANCH=unimarc

Then start the koha container
When the misc4dev will start its job, the scripts will have the expected
data to continue.

Without this patch you will get
koha_1       | Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.

And plenty of errors will follow.

Also, the sample data used in misc4dev will use CPL
(/kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql)

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>


Current status: Passed QA
Comment 12 Katrin Fischer 2020-03-16 21:11:08 UTC
Created attachment 100820 [details] [review]
Bug 24851: Translate the .txt in French

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Martin Renvoize 2020-03-18 08:40:34 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 14 Joy Nelson 2020-04-03 18:22:13 UTC
backported to 19.11.x branch for 19.11.05
Comment 15 Lucas Gass 2020-04-13 16:21:37 UTC
backported to 19.05.x for 19.05.10
Comment 16 Hayley Mapley 2020-04-20 00:00:25 UTC
Enhancement/normal will not be backported to 18.11.x series