Bugzilla – Attachment 70837 Details for
Bug 20073
Move Elasticsearch settings to configuration files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20073: Add database and mappings UI support for isbn and stdno field types.
Bug-20073-Add-database-and-mappings-UI-support-for.patch (text/plain), 4.05 KB, created by
Ere Maijala
on 2018-01-23 13:49:22 UTC
(
hide
)
Description:
Bug 20073: Add database and mappings UI support for isbn and stdno field types.
Filename:
MIME Type:
Creator:
Ere Maijala
Created:
2018-01-23 13:49:22 UTC
Size:
4.05 KB
patch
obsolete
>From 84f980971abd65f76ce7f7515c2e5b196ba068e8 Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Tue, 23 Jan 2018 15:46:25 +0200 >Subject: [PATCH] Bug 20073: Add database and mappings UI support for isbn and > stdno field types. > >--- > installer/data/mysql/atomicupdate/bug_20073.perl | 8 ++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > .../modules/admin/searchengine/elasticsearch/mappings.tt | 14 +++++++++++++- > 3 files changed, 22 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_20073.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_20073.perl b/installer/data/mysql/atomicupdate/bug_20073.perl >new file mode 100644 >index 0000000..0fd4b45 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_20073.perl >@@ -0,0 +1,8 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( "ALTER TABLE search_field CHANGE COLUMN type type ENUM('', 'string', 'date', 'number', 'boolean', 'sum', 'isbn', 'stdno') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine'" ); >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 20073 - Add new types for Elasticsearch fields)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f031503..204e1b4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1483,7 +1483,7 @@ CREATE TABLE `search_field` ( > `id` int(11) NOT NULL AUTO_INCREMENT, > `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine', > `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display', >- `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine', >+ `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum', 'isbn', 'stdno') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine', > PRIMARY KEY (`id`), > UNIQUE KEY (`name`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >index 4f406c0..b6b6aa2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >@@ -1,7 +1,9 @@ >+[% USE Koha %] >+[% SET KOHA_VERSION = Koha.Preference('Version') %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Elastic Search mappings</title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.tablednd.js"></script> >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.tablednd_[% KOHA_VERSION %].js"></script> > <script type="text/javascript"> > function clean_line( line ) { > $(line).find('input[type="text"]').val(""); >@@ -163,6 +165,16 @@ a.add, a.delete { > [% ELSE %] > <option value="sum">Sum</option> > [% END %] >+ [% IF search_field.type == "isbn" %] >+ <option value="isbn" selected="selected">ISBN</option> >+ [% ELSE %] >+ <option value="isbn">ISBN</option> >+ [% END %] >+ [% IF search_field.type == "stdno" %] >+ <option value="stdno" selected="selected">Std. Number</option> >+ [% ELSE %] >+ <option value="stdno">Std. Number</option> >+ [% END %] > </select> > </td> > </tr> >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20073
:
70827
|
70836
|
70837
|
73054
|
73138
|
73144
|
73383
|
74420
|
74421
|
74759
|
75438
|
75453
|
75829
|
75830
|
75831
|
76315
|
76520