View | Details | Raw Unified | Return to bug 20073
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_20073.perl (+8 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $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'" );
4
5
    # Always end with this (adjust the bug info)
6
    SetVersion( $DBversion );
7
    print "Upgrade to $DBversion done (Bug 20073 - Add new types for Elasticsearch fields)\n";
8
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1483-1489 CREATE TABLE `search_field` ( Link Here
1483
  `id` int(11) NOT NULL AUTO_INCREMENT,
1483
  `id` int(11) NOT NULL AUTO_INCREMENT,
1484
  `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
1484
  `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
1485
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1485
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1486
  `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
1486
  `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',
1487
  PRIMARY KEY (`id`),
1487
  PRIMARY KEY (`id`),
1488
  UNIQUE KEY (`name`)
1488
  UNIQUE KEY (`name`)
1489
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1489
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt (-2 / +13 lines)
Lines 1-7 Link Here
1
[% USE Koha %]
2
[% SET KOHA_VERSION = Koha.Preference('Version') %]
1
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Elastic Search mappings</title>
4
<title>Koha &rsaquo; Administration &rsaquo; Elastic Search mappings</title>
3
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.tablednd.js"></script>
6
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.tablednd_[% KOHA_VERSION %].js"></script>
5
<script type="text/javascript">
7
<script type="text/javascript">
6
    function clean_line( line ) {
8
    function clean_line( line ) {
7
        $(line).find('input[type="text"]').val("");
9
        $(line).find('input[type="text"]').val("");
Lines 163-168 a.add, a.delete { Link Here
163
                          [% ELSE %]
165
                          [% ELSE %]
164
                            <option value="sum">Sum</option>
166
                            <option value="sum">Sum</option>
165
                          [% END %]
167
                          [% END %]
168
                          [% IF search_field.type == "isbn" %]
169
                            <option value="isbn" selected="selected">ISBN</option>
170
                          [% ELSE %]
171
                            <option value="isbn">ISBN</option>
172
                          [% END %]
173
                          [% IF search_field.type == "stdno" %]
174
                            <option value="stdno" selected="selected">Std. Number</option>
175
                          [% ELSE %]
176
                            <option value="stdno">Std. Number</option>
177
                          [% END %]
166
                        </select>
178
                        </select>
167
                      </td>
179
                      </td>
168
                    </tr>
180
                    </tr>
169
- 

Return to bug 20073