Bug 33419: Make home library and current library mandatory by default
authorLaura Escamilla <laura.escamilla@bywatersolutions.com>
Tue, 2 May 2023 18:35:23 +0000 (18:35 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 12 May 2023 14:36:59 +0000 (15:36 +0100)
commitd227910167a0cacc8a31e69ab4daa672b1f05e6d
tree2c4c6b501dbaeca56233f394f967f028bd094d24
parent158a52b16b6057ce3a8c65e24bdf2c8858354aba
Bug 33419: Make home library and current library mandatory by default

Items without a home and current library can cause errors in Koha.
On the bibliographic page, items appear without the "edit" drop-down
or the selection check box. On a bulk delete page, items without
a home library create a red error that says "Cannot delete".

Making the home and current library values mandatory
helps avoid these issues.

Test plan (using koha-testing-docker (KTD)):
1. Reset KTD so that the web installer is used to setup Koha.[1]
2. Setup Koha using the web installer
   -> When setting up the default settings, don't add any of the
      optional data.
3. Once setup and logged in, check the two frameworks (default and ACQ)
    and note that $952$a and $952$b are not mandatory.
4. Apply the patch.
5. Repeat steps 1-2.
6. Once setup and logged in, check the two frameworks (default and ACQ)
   and note that $952$a and $952$b are now mandatory.

[1] How to access the web installer to setup Koha in KTD:
1. Access the database server:
   mysql -uroot -ppassword -hkoha-db-1
2. Drop the koha_kohadev database: drop database koha_kohadev;
3. Create the database: create database koha_kohadev;
4. Add privileges (for a real installation this would be limited):
   grant all on koha_kohadev.* to koha_kohadev;
5. Restart everything (there may be some errors listed):
   flush_memcached and then restart_all
6. Access the web installer: go to 127.0.0.1:8081
7. Use the database user name and password:
   get from /etc/koha/sites/kohadev/koha-conf.xml
   (default: koha_kohadev, password)
8. Continue through the installation process.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6caabfd2b0e2d5ad7c0b55a6273d62ea30807cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml
installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.yml
t/db_dependent/selenium/basic_workflow.t