From 811bee9bce57e67fd22562b3bb62397335b4eeb5 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Fri, 16 Aug 2019 14:28:59 -0400 Subject: [PATCH] Bug 23353: ACQ framework makes fr-CA web installer explode This patch removes the standalone ACQ framework SQL file in the fr-CA directory and adds the ACQ framework creation SQL in the default framework file, as it is in other languages. Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- .../obligatoire/marc21_framework_DEFAULT.sql | 56 +++++++++++++++++++ .../marc21_sample_acq_framework.sql | 56 ------------------- .../marc21_sample_acq_framework.txt | 1 - 3 files changed, 56 insertions(+), 57 deletions(-) delete mode 100644 installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.sql delete mode 100644 installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.txt diff --git a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_framework_DEFAULT.sql b/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_framework_DEFAULT.sql index b73eb1c09c..77e4468005 100644 --- a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_framework_DEFAULT.sql @@ -2821,3 +2821,59 @@ INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008'; + + +-- Create the ACQ framework based on the default framework +-- Fields 952 +INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Grille d\'acquisitions' ); +INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) +SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode=''; + +INSERT INTO marc_subfield_structure(tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue, maxlength) +SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'ACQ', seealso, link, defaultvalue, maxlength FROM marc_subfield_structure WHERE tagfield='952' AND frameworkcode=''; + +-- Some biblio-level fields +INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) +SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' +FROM marc_tag_structure +WHERE frameworkcode="" AND tagfield IN ( + SELECT tagfield + FROM marc_subfield_structure + WHERE ( + kohafield="biblio.title" + OR kohafield="biblio.author" + OR kohafield="biblioitems.publishercode" + OR kohafield="biblioitems.editionstatement" + OR kohafield="biblio.copyrightdate" + OR kohafield="biblioitems.isbn" + OR kohafield="biblio.seriestitle" + ) AND frameworkcode="" +); +INSERT INTO marc_subfield_structure(tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue, maxlength) +SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'ACQ', seealso, link, defaultvalue, maxlength +FROM marc_subfield_structure +WHERE frameworkcode="" +AND kohafield IN ("biblio.title", "biblio.author", "biblioitems.publishercode", "biblioitems.editionstatement", "biblio.copyrightdate", "biblioitems.isbn", "biblio.seriestitle" ); + + +-- ************************************** +-- IGNORE CERTAINES SOUS-ZONES EXEMPLAIRE +-- ************************************** + +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '0' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '2' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '4' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '5' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'f' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'g' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'j' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'l' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'm' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'n' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'q' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'r' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 's' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'u' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'v' AND frameworkcode = 'ACQ'; +UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'w' AND frameworkcode = 'ACQ'; diff --git a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.sql b/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.sql deleted file mode 100644 index f5131375d8..0000000000 --- a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.sql +++ /dev/null @@ -1,56 +0,0 @@ -INSERT IGNORE INTO biblio_framework VALUES - ('ACQ', 'Grille d\'acquisitions'); - -INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) -SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' -FROM marc_tag_structure -WHERE frameworkcode = ''; - -INSERT IGNORE INTO marc_subfield_structure (tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue) -SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'ACQ', seealso, link, defaultvalue -FROM marc_subfield_structure -WHERE frameworkcode = ''; - -INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode) -SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' -FROM marc_tag_structure -WHERE frameworkcode="" AND tagfield IN ( - SELECT tagfield - FROM marc_subfield_structure - WHERE ( - kohafield="biblio.title" - OR kohafield="biblio.author" - OR kohafield="biblioitems.publishercode" - OR kohafield="biblioitems.editionstatement" - OR kohafield="biblio.copyrightdate" - OR kohafield="biblioitems.isbn" - OR kohafield="biblio.seriestitle" - ) AND frameworkcode="" -); -INSERT INTO marc_subfield_structure(tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue, maxlength) -SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'ACQ', seealso, link, defaultvalue, maxlength -FROM marc_subfield_structure -WHERE frameworkcode="" -AND kohafield IN ("biblio.title", "biblio.author", "biblioitems.publishercode", "biblioitems.editionstatement", "biblio.copyrightdate", "biblioitems.isbn", "biblio.seriestitle" ); - --- ************************************** --- IGNORE CERTAINES SOUS-ZONES EXEMPLAIRE --- ************************************** - -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '0' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '2' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '4' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = '5' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'f' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'g' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'j' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'l' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'm' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'n' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'q' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'r' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 's' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'u' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'v' AND frameworkcode = 'ACQ'; -UPDATE marc_subfield_structure SET tab = -1 WHERE tagfield = '952' AND tagsubfield = 'w' AND frameworkcode = 'ACQ'; diff --git a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.txt b/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.txt deleted file mode 100644 index 89642d2ab5..0000000000 --- a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.txt +++ /dev/null @@ -1 +0,0 @@ -'Grille d'acquisition ACQ. Elle permet de gérer les exemplaires dans le module Acquisitions. -- 2.39.5