From d632da51c80f9c4215c6952793353803038d98d3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 26 Oct 2017 17:29:36 -0300 Subject: [PATCH] Bug 19289: Add existing fields to the ACQ framework When ordering, the bibliographic details contain the title, author, publisher code, publication year, isbn and series info. To avoid regression to provide the same behaviour, we will add these fields to the ACQ framework NOTE: This patch makes the change only for - en - fr / unimarc complet Other frameworks will be updated before to be pushed, to avoid unecessary rebases Signed-off-by: Josef Moravec Signed-off-by: Nicolas Legrand Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../mandatory/marc21_framework_DEFAULT.sql | 22 ++++++++++++++++ .../Obligatoire/framework_DEFAULT.sql | 25 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index 46bf421296..33997d1bc4 100644 --- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -4472,3 +4472,25 @@ SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 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=''; + +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="biblioitems.publicationyear" + 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", "biblioitems.publicationyear", "biblioitems.isbn", "biblio.seriestitle" ); diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql index b50ba6027d..23f4b98506 100644 --- a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql +++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql @@ -2144,3 +2144,28 @@ SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 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='995' 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=''; + +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="biblioitems.publicationyear" + 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", "biblioitems.publicationyear", "biblioitems.isbn", "biblio.seriestitle" ); -- 2.39.5