Items without a home branch can cause errors in Koha. On the bib page, items appear without the "edit" drop-down or the selection check box. On a bulk delete page, items without a home branch create a red error that says "Cannot delete". Making the home branch value mandatory can help avoid these issues.
Created attachment 149211 [details] [review] Bug 33419: Set home library mandatory by default (UNIMARC)
Created attachment 149213 [details] [review] Bug 33419: Set home library mandatory by default
Created attachment 149214 [details] [review] Bug 33419: Update basic_workflow.t
Created attachment 149218 [details] [review] Bug 33419: Update basic_workflow.t
Test plan to be used with KTD (Koha Testing Docker): 1. Reset KTD so that the web installer is used to setup Koha 2. Setup 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 is 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 is now mandatory. How to setup the web installer ~~~~~~~~~~~~~~~~~~~~~~~ 1. Access the database server[1]: 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 (may not be required, but just to be safe): flush_memcached + 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
Hi Laura, I fully agree with this change. Some small things: 1) Please take a look at your dev environment configuration, you probably missed setting the variables in .env. The patches were written by: From: John Doe <you@example.com> 2) Should we not do the same for holding library? ... I can't finish here right now because I have some trouble with Selenium tonight.
Thank you for taking the time to look at this! You're right, I do need to make some changes to my Dev environment config. I'll work on that and rebase the patches. We should do the same for the holding library. Do you suggest that we include this in the same bug or open a new bug for this? (In reply to Katrin Fischer from comment #6) > Hi Laura, > > I fully agree with this change. Some small things: > > 1) Please take a look at your dev environment configuration, you probably > missed setting the variables in .env. The patches were written by: > From: John Doe <you@example.com> > > 2) Should we not do the same for holding library? > > ... I can't finish here right now because I have some trouble with Selenium > tonight.
I think combining both here would make sense. We can also write up some nice release notes to highlight the change in one place then.
Hi Laura, I'd love to see this in 23.05 - please let me know if you need any help or won't have time to continue. We can figure something out.
(In reply to Katrin Fischer from comment #9) > Hi Laura, I'd love to see this in 23.05 - please let me know if you need any > help or won't have time to continue. We can figure something out. Hi Katrin! I was out recently for parental leave, I will get back to working on this asap!
Created attachment 150462 [details] [review] Bug 33419: Set home library and current library as mandatory by default Test plan to be used with KTD (Koha Testing Docker): 1. Reset KTD so that the web installer is used to setup Koha 2. Setup 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. How to setup the web installer ~~~~~~~~~~~~~~~~~~~~ 1. Access the database server[1]: 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 (may not be required, but just to be safe): flush_memcached + 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
Hi Laura, glad to have you back and congratulations :) Leaving another note for later: I was wondering if we should also update existing ones with a database update. So I checked what we did for itype (see bug 25449). We didn't do a database update there, so answering my own question: I think w don't need one here either.
Created attachment 150530 [details] [review] Bug 33419: Set home library and current library as mandatory by default Test plan to be used with KTD (Koha Testing Docker): 1. Reset KTD so that the web installer is used to setup Koha 2. Setup 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. How to setup the web installer ~~~~~~~~~~~~~~~~~~~~ 1. Access the database server[1]: 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 (may not be required, but just to be safe): flush_memcached + 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
Created attachment 150531 [details] [review] Bug 33419: Set home library and current library as mandatory by default
Created attachment 150532 [details] [review] Bug 33419: Make home library and current library mandatory by default
Test plan to be used with KTD (Koha Testing Docker): 1. Reset KTD so that the web installer is used to setup Koha 2. Setup 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. How to setup the web installer ~~~~~~~~~~~~~~~~~~~~~~~ 1. Access the database server[1]: 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 (may not be required, but just to be safe): flush_memcached + 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
Hi Laura, 2 small problems: 1) UNIMARC is missing the change for holdingbranch. +++ b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.yml @@ -849,7 +849,7 @@ tables: liblibrarian: "Home library" libopac: "Home library" repeatable: 0 - mandatory: 0 + mandatory: 1 kohafield: items.homebranch tab: 10 authorised_value: branches 2) Patch was not authored by you :) From 56de1c94a44702135407c30d318c896b50fd1fcb Mon Sep 17 00:00:00 2001 From: John Doe <you@example.com> Date: Tue, 2 May 2023 18:35:23 +0000 Subject: [PATCH] Bug 33419: Make home library and current library mandatory by default Have a look at git commit --amend --reset-author (when you have fixed the config) or git commit --amend --author if you just want to rewrite the line.
Created attachment 150553 [details] [review] 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>
Hi Laura. I have signed off, and also had a go at amending the commit message to include a description and the test plan (including adding your name as the author). (See https://wiki.koha-community.org/wiki/Commit_messages) Feel free to amend it! David
I had another look - the note about UNIMARC is invalid - holdingbranch already is mandatory without this patch. But now I get: FAIL t/db_dependent/selenium/basic_workflow.t FAIL valid syntax error Missing right curly or square bracket t/db_dependent/selenium/basic_workflow.t had compilation errors.
Created attachment 150555 [details] [review] 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>
Created attachment 150556 [details] [review] Bug 33419: (QA follow-up) Remove changes to basic_workflow.t These are not needed: 942 and 200 have no subfields for homebranch and holdingbranch. The tests pass without these changes. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
I don't think I want to backport this behavior change at this point in the 22.05.x lifecycle. No backport unless requested.