Bugzilla – Attachment 129537 Details for
Bug 29893
ElasticSearch Config UI deletes mappings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29893: Prevent ES mappings UI to remove hidden rows
Bug-29893-Prevent-ES-mappings-UI-to-remove-hidden-.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2022-01-17 14:47:26 UTC
(
hide
)
Description:
Bug 29893: Prevent ES mappings UI to remove hidden rows
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-01-17 14:47:26 UTC
Size:
2.22 KB
patch
obsolete
>From 14763a8773950937276ee4532174ee25692e3ace Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 17 Jan 2022 15:45:06 +0100 >Subject: [PATCH] Bug 29893: Prevent ES mappings UI to remove hidden rows > >If you are editing ES mappings and you use the DataTable filtering option, >the table won't contain all the mappings you have in the DB. >If the form is submitted they will be removed and data will be lost! > >Test plan: >Edit ES mappings, filter and submit the form. >Confirm that the table are redrawn before the form submission which >prevent data loss >--- > .../modules/admin/searchengine/elasticsearch/mappings.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js | 8 ++++++++ > 2 files changed, 9 insertions(+), 1 deletion(-) > >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 3f17b20e321..417b533b6ac 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 >@@ -114,7 +114,7 @@ a.add, a.delete { > </ol> > </div> > >- <form method="post"> >+ <form id="es_mappings" method="post"> > <div id="tabs" class="toptabs ui-tabs" style="clear:both"> > <ul> > <li><a href="#search_fields">Search fields</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >index 4b36850c4a2..4bc9225f011 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js >@@ -82,4 +82,12 @@ $(document).ready(function () { > $("#facet_biblios > table").tableDnD({ > onDragClass: "dragClass highlighted-row", > }); >+ >+ $("#es_mappings").on("submit", function(e){ >+ e.preventDefault(); >+ $("#search_fields_table").DataTable().search('').draw(); >+ $("#mapping_biblios_table").DataTable().search('').draw(); >+ $("#mapping_authorities_table").DataTable().search('').draw(); >+ this.submit(); >+ }); > }); >-- >2.25.1
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 29893
:
129537
|
129571
|
130237
|
130348
|
130349
|
130764
|
130768
|
130769
|
130770
|
132185
|
132186
|
132187