[Bug 19482] New: Elasticsearch - prevent removal / editing of required indexes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Bug ID: 19482 Summary: Elasticsearch - prevent removal / editing of required indexes Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com Sorting options are currently hardcoded, in view of future z39 support with ES and other interfaces it is probably best to provide a base set of fields that are indexed and sortable. Using the base set of sorting this patchset will prevent editing/removal of these fields by default -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68246 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68246&action=edit Bug 19482 - DB changes -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68247 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68247&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - Reset Es mapping: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 3 - issues should now be uneditable and not removable -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 68248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68248&action=edit Bug 19482 - Schema changes (DO NOT PUSH) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |david.bourgault@inlibro.com --- Comment #4 from David Bourgault <david.bourgault@inlibro.com> --- The 2nd patch does not apply on current master. (Lacking or useless SHA1) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |19481 Status|Patch doesn't apply |Needs Signoff Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19481 [Bug 19481] Elasticsearch - Set default fields for sorting in mappings.yaml -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from David Bourgault <david.bourgault@inlibro.com> --- Correction, patch does apply; I had simply overlooked the dependency. I applied the patch and update the database (updatedatabase.pl) however, even after reset-ing the mappings I could not get issues to show up as readonly. I tried reset-ing again (twice) to no avail. Looking into the database I saw the the mandatory flag wasn't being set properly. After switching it manually it did show up as readonly, as expected. However I'd suggest displaying the type as a <label> instead of a readonly text input. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 69250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69250&action=edit Bug 19482 - Make reset mappings reset also reset fields I think this makes sense, we should reset to the mappings file completely To test: 1 - Change a field label in es 2 - Save it 3 - Reset mapping 4 - Label should be reset -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to David Bourgault from comment #5)
I applied the patch and update the database (updatedatabase.pl) however, even after reset-ing the mappings I could not get issues to show up as readonly. I tried reset-ing again (twice) to no avail.
Indeed, it seems a reset does not actually perform a full reset, it only resets the marc to field mappings I added an initial patch to ensure that data would be updated, however, I am wondering if we should alter reset to do a full reload, deleting all existing and loading the file fresh? It hsould probably be its own bug if so -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68246|0 |1 is obsolete| | Attachment #68247|0 |1 is obsolete| | Attachment #68248|0 |1 is obsolete| | Attachment #69250|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 72846 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72846&action=edit Bug 19482 - DB changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 72847 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72847&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - Clear all ES mappings form the db: DELETE FROM search_fields; DELETE FROM search_marc_maps; DELETE FROM search_marc_to_fields; 3 - Reset Es mapping: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 4 - issues should now be uneditable and not removable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 72848 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72848&action=edit Bug 19482 - Schema changes (DO NOT PUSH) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- I updated the instructions, this should work if the settings are entirely cleared - that should be dealt with on a separate bug though. This should be testable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72846|0 |1 is obsolete| | --- Comment #12 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 72878 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72878&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72847|0 |1 is obsolete| | --- Comment #13 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 72879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72879&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Clear all ES mappings form the db: DELETE FROM search_field; DELETE FROM search_marc_map; DELETE FROM search_marc_to_field; 4 - Reset ES mapping: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 5 - issues should now be uneditable and not removable Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72848|0 |1 is obsolete| | --- Comment #14 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 72880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72880&action=edit Bug 19482 - Schema changes (DO NOT PUSH) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nicolas.legrand@bulac.fr --- Comment #15 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- I have slightly changed the test plan (added updatedatabase, and also correct table names with the DELETE part). Hope it's OK ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com QA Contact| |alex.arnaud@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #16 from Alex Arnaud <alex.arnaud@biblibre.com> --- Comment on attachment 72879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72879 Bug 19482 - Add support for defining 'mandatory' mappings Review of attachment 72879: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=19482&attachment=72879) ----------------------------------------------------------------- ::: Koha/SearchEngine/Elasticsearch.pm @@ +286,5 @@
while ( my ( $field_name, $data ) = each %$fields ) { my $field_type = $data->{type}; my $field_label = $data->{label}; + my $field_mandatory = $data->{mandatory}; + warn $field_mandatory;
Debug thing? ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ +143,3 @@
<td> + [% IF is_readonly %] + <input type="text" name="search_field_type" value="[% search_field.type FILTER ucfirst%]" [% is_readonly %] />
Maybe this readonly input should be sized? This cause the input is larger than the selects and so expand the "Type" column. Or maybe use a <label> as suggested by David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72878|0 |1 is obsolete| | Attachment #72879|0 |1 is obsolete| | Attachment #72880|0 |1 is obsolete| | --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77007 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77007&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77008&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Clear all ES mappings form the db: DELETE FROM search_field; DELETE FROM search_marc_map; DELETE FROM search_marc_to_field; 4 - Reset ES mapping: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 5 - issues should now be uneditable and not removable Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77009&action=edit Bug 19482: (follow-up) QA fixes Remove debug statement Use disaled select to match other fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #20 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 77010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77010&action=edit Bug 19482: DO NOT PUSH Schema changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #21 from Alex Arnaud <alex.arnaud@biblibre.com> --- Applying: Bug 19482 - DB changes Applying: Bug 19482 - Add support for defining 'mandatory' mappings Using index info to reconstruct a base tree... M admin/searchengine/elasticsearch/mappings.pl M koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt Auto-merging admin/searchengine/elasticsearch/mappings.pl error: Failed to merge in the changes. Patch failed at 0001 Bug 19482 - Add support for defining 'mandatory' mappings The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-19482---Add-support-for-defining-mandatory-map-fo6gJt.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77007|0 |1 is obsolete| | Attachment #77008|0 |1 is obsolete| | Attachment #77009|0 |1 is obsolete| | Attachment #77010|0 |1 is obsolete| | --- Comment #22 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 80817 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80817&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #23 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 80818 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80818&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Clear all ES mappings form the db: DELETE FROM search_field; DELETE FROM search_marc_map; DELETE FROM search_marc_to_field; 4 - Reset ES mapping: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 5 - issues should now be uneditable and not removable Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #24 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 80819 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80819&action=edit Bug 19482: (follow-up) QA fixes Remove debug statement Use disaled select to match other fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #25 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 80820 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80820&action=edit Bug 19482: DO NOT PUSH Schema changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #26 from Alex Arnaud <alex.arnaud@biblibre.com> --- Here is a (late, sorry) fonctional point of view: The current patches make all the mapping bloqued for a search field marked as mandatory. I think we need some mandatory mappings but not all. For exemple, title in 245$a should be a mandatory mapping but not 247$a (it's an example). On my own instance i have about 40 mappings on title. So they are all uneditable/undeletable. Also, if i make a mistake by creating a wrong mapping for a mandatory field, i can't delete it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 e.betemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |e.betemps@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 e.betemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|e.betemps@gmail.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80817|0 |1 is obsolete| | Attachment #80818|0 |1 is obsolete| | Attachment #80819|0 |1 is obsolete| | Attachment #80820|0 |1 is obsolete| | --- Comment #27 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 93366 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93366&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #28 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 93367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93367&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page 4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable 5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues 6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript 7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #29 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 93368 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93368&action=edit Bug 19482: SCHEMA CHANGES - DO NOT PUSH -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93366|0 |1 is obsolete| | --- Comment #30 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 93371 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93371&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93367|0 |1 is obsolete| | --- Comment #31 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 93372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93372&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page 4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable 5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues 6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript 7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93368|0 |1 is obsolete| | --- Comment #32 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 93373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93373&action=edit Bug 19482: SCHEMA CHANGES - DO NOT PUSH Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #33 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Thank you Nick! Tested with Unimarc, so there isn't any issues index defined for the Bibliographic records section. Everything went as it should for the rest of it. It could be puzzling for the Unimarc community, because our modifications will be blocked and we will see the message : “You attempted to delete all mappings for a required index, you must leave at least one mapping” until we add an issues index in Bibliographic records. I'm not sure this should be fixed here or in a mapping.yaml patch. Listing the name of the required field missing in the error message could be a nice improvement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 e.betemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |e.betemps@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bouzid.fergani@inlibro.com --- Comment #34 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Hi, We have conflict when applying. Bug 19482 - Elasticsearch - prevent removal / editing of required indexes 93371 - Bug 19482 - DB changes 93372 - Bug 19482 - Add support for defining 'mandatory' mappings 93373 - Bug 19482: SCHEMA CHANGES - DO NOT PUSH Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 19482 - DB changes Using index info to reconstruct a base tree... M installer/data/mysql/kohastructure.sql Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/kohastructure.sql CONFLICT (content): Merge conflict in installer/data/mysql/kohastructure.sql error: Failed to merge in the changes. Patch failed at 0001 Bug 19482 - DB changes The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-19482---DB-changes-FC4ixa.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #35 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- CONFLICT (content): Merge conflict in installer/data/mysql/kohastructure.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93371|0 |1 is obsolete| | Attachment #93372|0 |1 is obsolete| | Attachment #93373|0 |1 is obsolete| | --- Comment #36 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 97226 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97226&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #37 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 97227 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97227&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page 4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable 5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues 6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript 7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #38 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 97228 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97228&action=edit Bug 19482: SCHEMA CHANGES _ DO NOT PUSH -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20388 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20388 [Bug 20388] Elasticsearch - Ability to add search fields from UI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97226|0 |1 is obsolete| | --- Comment #39 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Created attachment 101312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101312&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97227|0 |1 is obsolete| | --- Comment #40 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Created attachment 101313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101313&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page 4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable 5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues 6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript 7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97228|0 |1 is obsolete| | --- Comment #41 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Created attachment 101314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101314&action=edit Bug 19482: SCHEMA CHANGES _ DO NOT PUSH Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23204 --- Comment #42 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Changes to mappings.yaml will need to be rebuilt on top of bug 23204 (sorry!) Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23204 [Bug 23204] Script for exporting Elasticsearch mappings to YAML -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #43 from Alex Arnaud <alex.arnaud@biblibre.com> --- Comment on attachment 101313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101313 Bug 19482 - Add support for defining 'mandatory' mappings Review of attachment 101313: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=19482&attachment=101313) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ +200,5 @@
+ [% IF search_field.type == "string" %] + <option value="string" selected="selected">String</option> + [% ELSE %] + <option value="string">String</option> + [% END %]
That makes the list empty instead of only disabled. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #44 from Alex Arnaud <alex.arnaud@biblibre.com> --- As Jonathan said, Koha::SearchEngine::Elasticsearch::raw_elasticsearch_mappings need to be updated with the new mandatory field. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101312|0 |1 is obsolete| | Attachment #101313|0 |1 is obsolete| | Attachment #101314|0 |1 is obsolete| | --- Comment #45 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108467&action=edit Bug 19482 - DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #46 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108468&action=edit Bug 19482 - Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page 4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable 5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues 6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript 7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #47 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108469&action=edit Bug 19482: (follow-up) Fix select and adjust export of new field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #48 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108470 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108470&action=edit Bug 19482: (optional) Export mappings and update shipped file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #49 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108471 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108471&action=edit Bug 19482: DO NOT PUSH - Schema changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #50 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Nick, the QA script found some problems, please fix: AIL installer/data/mysql/kohastructure.sql OK boolean_vs_tinyint OK charset_collate OK git manipulation FAIL tinyint_has_boolean_flag The new column search_field.mandatory is using TINYINT(1) as type but is not defined as boolean in the schema file (Koha/Schema/Result/SearchField.pm), see the SQL12 coding guideline FAIL koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt FAIL filters missing_filter at line 193 ( <input type="text" name="search_field_name" value="[% search_field.name | html %]" [% is_readonly %]/>) missing_filter at line 196 ( <input type="text" name="search_field_label" value="[% search_field.label | html %]" [% is_readonly %]/>) missing_filter at line 383 ( <td><a class="btn btn-default btn-xs delete mandatory" data-field_name="[% mapping.search_field_name %]" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a></td>) OK forbidden patterns OK git manipulation OK js_in_body OK spelling FAIL tt_valid lines 193, 196 OK valid_template * Commit title does not start with 'Bug XXXXX: ' - df373aaf1f * Commit title does not start with 'Bug XXXXX: ' - 7c2fb8cbb1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #51 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- ping Nick, those are easy QA issues to fix! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #52 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111923&action=edit Bug 19482: DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #53 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111924&action=edit Bug 19482: Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page 4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable 5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues 6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript 7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108469|0 |1 is obsolete| | --- Comment #54 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111925&action=edit Bug 19482: (follow-up) Fix select and adjust export of new field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #55 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111926&action=edit Bug 19482: (follow-up) Add missing filters and boolean switch to schema -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #56 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111927 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111927&action=edit Bug 19482: DO NOT PUSH: SCHEMA UPDATES -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108467|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108468|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108470|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108471|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #57 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #50)
Hi Nick,
the QA script found some problems, please fix:
Done
FAIL tt_valid lines 193, 196
This is a false positive - it doesn't like my unquoted TT variable in an html tag, but that's how readonly works -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #58 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111929 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111929&action=edit Bug 19482: (follow-up) Don't set readonly as a variable, use conditionals -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #59 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Nick Clemens from comment #57)
This is a false positive - it doesn't like my unquoted TT variable in an html tag, but that's how readonly works
I changed code and now is removed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #60 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Nick, I think there are some small things: 1) We are missing unit tests for the changes to SearchField.pm and Elasticsearch.pm 2) I believe the </tr> removed needs to be added back after the ELSE: <td> + [% IF search_field.mandatory %] + <input type="text" name="search_field_label" value="[% search_field.label | html %]" readonly /> + [% ELSE %] <input type="text" name="search_field_label" value="[% search_field.label | html %]" /> - </td> + [% END %] + <td> 3) Database update + if( !column_exists( 'search_field', 'mandatory' ) ) { + $dbh->do( "ALTER TABLE search_field ADD COLUMN mandatory tinyint(1) NULL DEFAULT NULL" ); + } Please add AFTER opac to make sure we always end up with the same sequence of columsn :) Functionality wise this appears to work ok. I think we'd need to work out which other fields we deem mandatory as a next step? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #61 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 112456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112456&action=edit Bug 19482: (follow-up) Fix update, add tests, restore closing </td> To test: 1 - View the mappings page, confirm table is correctly structured 2 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/ExportConfig.t t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t t/db_dependent/Koha/SearchField.t 3 - Confirm update statement works and table is ordered correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111923|0 |1 is obsolete| | --- Comment #62 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112459&action=edit Bug 19482: DB changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111924|0 |1 is obsolete| | --- Comment #63 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112460 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112460&action=edit Bug 19482: Add support for defining 'mandatory' mappings To test: 1 - Apply patch 2 - ./installer/data/mysql/updatedatabase.pl 3 - Reset ES mapping: Administration->Search engine configuration , button at bottom of page 4 - 'issues' and 'title' mapping under 'search fields' should be mandatory and not editable 5 - On 'Bibliographic records' tab you should not be able to delete the single entry for issues 6 - You should be able to delete 'title' mappings, however, at the final one you should be stopped by javascript 7 - Bonus: force remove the last mapping from the page using developer tools - attempt to save and should be warned of missing mandatory mapping Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> https://bugs.koha-community.org/show_bug.cgi?id=21357 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111925|0 |1 is obsolete| | --- Comment #64 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112461 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112461&action=edit Bug 19482: (follow-up) Fix select and adjust export of new field Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111926|0 |1 is obsolete| | --- Comment #65 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112462&action=edit Bug 19482: (follow-up) Add missing filters and boolean switch to schema Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111927|0 |1 is obsolete| | --- Comment #66 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112463&action=edit Bug 19482: DO NOT PUSH: SCHEMA UPDATES Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111929|0 |1 is obsolete| | --- Comment #67 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112464&action=edit Bug 19482: (follow-up) Don't set readonly as a variable, use conditionals Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #112456|0 |1 is obsolete| | --- Comment #68 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112465&action=edit Bug 19482: (follow-up) Fix update, add tests, restore closing </td> To test: 1 - View the mappings page, confirm table is correctly structured 2 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/ExportConfig.t t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t t/db_dependent/Koha/SearchField.t 3 - Confirm update statement works and table is ordered correctly Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #69 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I am a bit reluctant regarding the 'if ($@ || @messages)' test, some messages could have been pushed outside of the eval. But letting it as it for now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #70 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This is what I had in mind. @ admin/searchengine/elasticsearch/mappings.pl:119 @ if ( $op eq 'edit' ) { } elsif ($field_weight <= 0 || !looks_like_number($field_weight)) { push @messages, { type => 'error', code => 'invalid_field_weight', 'weight' => $field_weight }; + $errors++; } else { $search_field->weight($field_weight); @ admin/searchengine/elasticsearch/mappings.pl:165 @ if ( $op eq 'edit' ) { search => $mapping_search }); } - push @messages, { type => 'error', code => 'missing_mandatory_fields' } if $mandatory_after < $mandatory_before; + if ( $mandatory_after < $mandatory_before ) { + push @messages, { type => 'error', code => 'missing_mandatory_fields' }; + $error++; + } }; - if ($@ || @messages) { + if ($@ || $errors) { push @messages, { type => 'error', code => 'error_on_update', message => $@, }; $schema->storage->txn_rollback; } else { Will see later if we need it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 --- Comment #71 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |These patches add the release notes| |option to define some | |fields as 'mandatory' in | |the mappings.yaml file for | |elasticsearch. | | | |A | |'mandatory' field cannot be | |deleted from the staff | |interface and must be | |mapped to at least one MARC | |field. | | | |The intention is to | |prevent removal of search | |fields that are required | |for Koha functionality - | |built in sorting fields, | |issues count, etc. | | | |These | |patches add the marker to | |'issues' and 'title' - | |more fields may be marked | |in the future Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #72 from Lucas Gass <lucas@bywatersolutions.com> --- enhancement will not be backported to 20.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Bug 19482 depends on bug 23204, which changed state. Bug 23204 Summary: Add script for exporting Elasticsearch mappings to YAML https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23204 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28279 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28279 [Bug 28279] mappings.yaml no longer in sync -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29436 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29436 [Bug 29436] Cannot reorder facets in staff interface elasticsearch configuration -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19482 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org