From 69645da2dc23e63b8ca7639090cd3a06c663c16c Mon Sep 17 00:00:00 2001 From: Cori Lynn Arnold Date: Wed, 4 Dec 2019 10:49:30 +0000 Subject: [PATCH] Bug 24108: Advanced Editor: Save .mrc save with a configurable value Creates a new systempref "SaveRecordbyControlNumber" which is initially set to 0 (off/no). By default saving .mrc (and .xml) will be saved by the biblionumber. To test: Apply the patches. 1. Open a record in the advanced editor 2. Save the record using the drop down box selecting "Save as MARC (.mrc) file. 3. Note that the file saved is the same as the biblionumber at the top of the Advanced Editor interface. 4. Update the database: update systempreferences set value = '1' where variable = 'SaveRecordbyControlNumber'; 5. Restart Koha 6. Verify that there is not a 001 field in the record (delete it if there is) Repeat steps 1, 2, & 3 for both .mrc and .xml options (the file should still be saved as the biblionumber if there is no control field) 7. Add a 001 field to the record such as "001 abc00012345" Repeat steps 1, 2 for both .mrc and .xml Verify that the files saved are named abc00012345.mrc and abc00012345.xml --- ...bug_24108-add_SaveRecordbyControlNumber_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_24108-add_SaveRecordbyControlNumber_syspref.sql diff --git a/installer/data/mysql/atomicupdate/bug_24108-add_SaveRecordbyControlNumber_syspref.sql b/installer/data/mysql/atomicupdate/bug_24108-add_SaveRecordbyControlNumber_syspref.sql new file mode 100644 index 0000000000..db11c9907f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_24108-add_SaveRecordbyControlNumber_syspref.sql @@ -0,0 +1 @@ +INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('SaveRecordbyControlNumber', '0', 'If set, advanced editor (Rancor) will use the control number field to populate the name of the save file, otherwise it uses the biblionumber.', NULL, 'YesNo'); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 612dcc20c6..96aa0b0eca 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -549,6 +549,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), ('RoutingListNote','To change this note edit RoutingListNote system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), +('SaveRecordbyControlNumber','0',NULL,'If set, advanced editor (Rancor) will use the control number field to populate the name of the save file, otherwise it uses the biblionumber.','YesNo'), ('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'), ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded