[Koha-bugs] [Bug 17260] updatedatabase.pl fails on invalid entries in ENUM and BOOLEAN columns
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Sep 20 03:27:45 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17260
--- Comment #2 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 55263
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55263
Bug 17260 - updatedatabase.pl fails on invalid entries in ENUM and BOOLEAN
columns
Review of attachment 55263:
--> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17260&attachment=55263)
-----------------------------------------------------------------
::: installer/data/mysql/updatedatabase.pl
@@ +12280,4 @@
> `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',
I'm not sure how to test for this.
@@ +12337,4 @@
> my $search_field = Koha::SearchFields->find_or_create({ name => $field_name, label => $field_label, type => $field_type }, { key => 'name' });
> for my $mapping ( @$mappings ) {
> my $marc_field = Koha::SearchMarcMaps->find_or_create({ index_name => $index_name, marc_type => $mapping->{marc_type}, marc_field => $mapping->{marc_field} });
> + $search_field->add_to_search_marc_maps($marc_field, { facet => $mapping->{facet} || 0, suggestible => $mapping->{suggestible} || 0, sort => $mapping->{sort} } );
I can voucher for this change easily. I reproduced it, and this fixes it.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list