When OpacSuppression is set to Hide, a value of 1 in 942$n will hide the record from the OPAC, whereas a value of 0 or empty will show the record in the OPAC. I think it would be logical to link the authorized value category "YES_NO" to the 942$n field in the Default framework. I usually add the link manually for all new installations (and sometimes I forget), but I feel like it's a normal use. Maybe we could add it to master? And also add 0 as default value, just to make sure the Yes is not selected by default.
Created attachment 117623 [details] [review] Bug 27852: Link YES_NO authorized value category to 942dev in Default framework This patch add the YES_NO authorised value category to 942dev in the Default framework and sets the default value to 0 (No). To test: 1) Load the yaml file (I used the load_yaml.pl script after deleting the values from my database) 2) Go to cataloging and open an empty cataloging form using the Default framework 3) Go to 942$n: the value should read No and there should be a drop down choice between Yes and No
After rereading the test plan, I realize it's not very clear... For step 1, I first deleted everything from the default (and ACQ) framework in marc_subfield_structure and marc_tag_structure delete from marc_subfield_structure where frameworkcode = ""; delete from marc_subfield_structure where frameworkcode = "ACQ"; delete from marc_tag_structure where frameworkcode = ""; delete from marc_tag_structure where frameworkcode = "ACQ"; Then, I used the load_yaml script to reload the marc21_framework_DEFAULT.yml file ./misc/load_yaml.pl -f ../installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
Hi Caroline. I had a go at testing this, and thanks for the clarification for step 1! I get this message after deleting the entries in the database and reloading the yaml file: root@kohadevbox:koha(bz27852)$ ./misc/load_yaml.pl -f ./installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load C4::Installer::load_sql returned the following errors while attempting to load ./installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml: DBD::mysql::db do failed: Duplicate entry 'ACQ' for key 'PRIMARY' at /kohadevbox/koha/C4/Installer.pm line 572. It does seem to work though as the$942n now has a Yes/ or No option, with No as the default. Not sure what affect the error message will have... David
Hi David! Thanks for testing this! I think I forgot to add that you have to also delete the frameworks... sorry about that Here's the updated test plan, hopefully this time it works! 1) Apply patch 2) In the database delete from marc_subfield_structure where frameworkcode = ""; delete from marc_subfield_structure where frameworkcode = "ACQ"; delete from marc_tag_structure where frameworkcode = ""; delete from marc_tag_structure where frameworkcode = "ACQ"; delete from biblio_framework where frameworkcode in ("", "ACQ"); 2) Load the yaml file ./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load 3) In Koha, go to cataloging and open an empty cataloging form using the Default framework 4) Go to 942$n: the value should read No and there should be a drop down choice between Yes and No
Thanks Caroline for the updated test plan, everything is working now - sign off on the way!
Created attachment 119141 [details] [review] Bug 27852: Link YES_NO authorized value category to 942dev in Default framework This patch add the YES_NO authorised value category to 942dev in the Default framework and sets the default value to 0 (No). To test: 1) Load the yaml file 1) Load the yaml file (I used the load_yaml.pl script after deleting the values from my database) 2) Go to cataloging and open an empty cataloging form using the Default framework 2) Go to 942dev: the value should read No and there should be a drop down choice between Yes and No Signed-off-by: David Nind <david@davidnind.com>
Created attachment 119829 [details] [review] Bug 27852: Link YES_NO authorized value category to 942dev in Default framework This patch add the YES_NO authorised value category to 942dev in the Default framework and sets the default value to 0 (No). To test: 1) Load the yaml file 1) Load the yaml file (I used the load_yaml.pl script after deleting the values from my database) 2) Go to cataloging and open an empty cataloging form using the Default framework 2) Go to 942dev: the value should read No and there should be a drop down choice between Yes and No Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
It's nice to see how our new .yml approach makes it easier to do these kinds of improvements. Note: I know that in order to have a complete change we'd need to update the sql installer files as well. But I feel that this would be forgiveable in this case as this has the character of an enhancement and can be easily fixed for other languages.
Pushed to master for 21.05, thanks to everybody involved!
Small enhancement, I choose to backport. Pushed to 20.11.x for 20.11.06
Enhancement, not backported to 20.05