Bug 19289: Add existing fields to the ACQ framework
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 26 Oct 2017 20:29:36 +0000 (17:29 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 11 Apr 2018 19:45:19 +0000 (16:45 -0300)
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 <josef.moravec@gmail.com>
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql

index 46bf421..33997d1 100644 (file)
@@ -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" );
index b50ba60..23f4b98 100644 (file)
@@ -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" );