Bug 30584 - Cannot add field mappings to Elasticsearch configuration
Summary: Cannot add field mappings to Elasticsearch configuration
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords: rel_21_11_candidate
Depends on: 29893
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-21 15:01 UTC by Nick Clemens
Modified: 2022-05-03 19:43 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05


Attachments
Bug 30584: Fix ES mapping creation (3.40 KB, patch)
2022-04-21 17:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30584: Fix ES mapping creation (3.44 KB, patch)
2022-04-22 10:01 UTC, David Nind
Details | Diff | Splinter Review
Bug 30584: Fix ES mapping creation (3.50 KB, patch)
2022-04-25 14:15 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-04-21 15:01:27 UTC
bug 29893 redraws the table before submission - this appears to remove any rows we have added

To test:
1 - Browse to Administration -> Catalog -> Search engine configuration (Elasticsearch)
2 - Click on 'Bibliographic records' tab
3 - Scroll to bottom and enter a new mapping and click '+Add' button at far right
4 - Click 'Save' button at bottom
5 - You may notice your new row disappears, then the page reloads
6 - Check for your new mapping - it has not been added
Comment 1 Jonathan Druart 2022-04-21 15:59:31 UTC
This template is a nightmare...
Comment 2 Jonathan Druart 2022-04-21 17:30:27 UTC
Created attachment 133595 [details] [review]
Bug 30584: Fix ES mapping creation

We need to tell DT that we are adding/removing row, not only deal
manually with the DOM.

This patch also fixes the following bug: if you add or remove a row from
the "biblio" tab, then go to another tab and back to "biblio", all
changes were gone (bug existed prior to bug 29893).

Test plan:
Add, edit and remove mappings, switch from tabs and save.
Use the filters, save (29893 regression test)
Comment 3 Jonathan Druart 2022-04-21 17:31:26 UTC
Upping severity, it impacts stable.
Comment 4 David Nind 2022-04-22 10:01:34 UTC
Created attachment 133657 [details] [review]
Bug 30584: Fix ES mapping creation

We need to tell DT that we are adding/removing row, not only deal
manually with the DOM.

This patch also fixes the following bug: if you add or remove a row from
the "biblio" tab, then go to another tab and back to "biblio", all
changes were gone (bug existed prior to bug 29893).

Test plan:
Add, edit and remove mappings, switch from tabs and save.
Use the filters, save (29893 regression test)

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Kyle M Hall 2022-04-25 14:10:55 UTC
Holding of on release of 21.11.05 until this has been pushed to master so I can backport it.
Comment 6 Nick Clemens 2022-04-25 14:15:32 UTC
Created attachment 133800 [details] [review]
Bug 30584: Fix ES mapping creation

We need to tell DT that we are adding/removing row, not only deal
manually with the DOM.

This patch also fixes the following bug: if you add or remove a row from
the "biblio" tab, then go to another tab and back to "biblio", all
changes were gone (bug existed prior to bug 29893).

Test plan:
Add, edit and remove mappings, switch from tabs and save.
Use the filters, save (29893 regression test)

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Fridolin Somers 2022-04-25 20:02:09 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Kyle M Hall 2022-04-26 13:31:33 UTC
Pushed to 21.11.x for 21.11.05
Comment 9 Andrew Fuerste-Henry 2022-05-03 19:43:23 UTC
Missing dependency, not backported to 21.05