Summary: | Link YES_NO authorized value category to 942$n in Default framework | ||
---|---|---|---|
Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Component: | MARC Bibliographic data support | Assignee: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, david, fridolin.somers, jonathan.druart, lucy.vaux-harvey |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch adds a Yes/No drop-down menu in the default bibliographic framework for field 942$n (MARC21). This field controls whether or not the record is hidden in the OPAC.
|
Version(s) released in: |
21.05.00,20.11.06
|
Circulation function: | |||
Bug Depends on: | 24594 | ||
Bug Blocks: | 28352 | ||
Attachments: |
Bug 27852: Link YES_NO authorized value category to 942dev in Default framework
Bug 27852: Link YES_NO authorized value category to 942dev in Default framework Bug 27852: Link YES_NO authorized value category to 942dev in Default framework |
Description
Caroline Cyr La Rose
2021-03-03 16:02:37 UTC
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 |