Bug 34625 - Search engine configuration tables header problem
Summary: Search engine configuration tables header problem
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 34695 (view as bug list)
Depends on: 33180
Blocks: 34504
  Show dependency treegraph
 
Reported: 2023-08-25 19:36 UTC by Fridolin Somers
Modified: 2023-09-15 09:33 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.10


Attachments
Screenshot of problem (207.61 KB, image/png)
2023-08-25 19:36 UTC, Fridolin Somers
Details
Bug 34625: Fix search engine configuration tables header problem (1.95 KB, patch)
2023-08-28 12:33 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34625: Fix search engine configuration tables header problem (2.01 KB, patch)
2023-08-29 07:01 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 34625: Fix search engine configuration tables header problem (2.07 KB, patch)
2023-09-04 23:45 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2023-08-25 19:36:15 UTC
Created attachment 154849 [details]
Screenshot of problem

Search engine configuration, when selecting second tab you seen no header.
When going down you see the floating header of first tab o_O
Comment 1 Fridolin Somers 2023-08-25 19:36:37 UTC
I bet it is since Bug 33180
Comment 2 Owen Leonard 2023-08-28 12:33:16 UTC
Created attachment 154880 [details] [review]
Bug 34625: Fix search engine configuration tables header problem

This patch corrects the JavaScript which allows DataTables to be created
and destroyed based on which tab is clicked on the search engine
configuration page. When you click from one tab to the other, the
original tab's DataTable should be destroyed and the new tab's DataTable
initialized.

To test, apply the patch and go to Administration -> Search engine
configuration (Elasticsearch)

- The page should load with the "Search fields" tab enabled and the
  DataTable initialized: Sorting and filtering should work. If you
  scroll down the page the floating table header should be correct.
- Switch to the "Bibliographic records" tab. This table should have
  filtering enabled, and the floating table header should work when you
  scroll down the page.
- The same should be true for the "Authorities" tab.
- Return to the "Search fields" tab to confirm that the DataTable is
  still working as expected.
Comment 3 Fridolin Somers 2023-08-29 07:01:55 UTC
Created attachment 154894 [details] [review]
Bug 34625: Fix search engine configuration tables header problem

This patch corrects the JavaScript which allows DataTables to be created
and destroyed based on which tab is clicked on the search engine
configuration page. When you click from one tab to the other, the
original tab's DataTable should be destroyed and the new tab's DataTable
initialized.

To test, apply the patch and go to Administration -> Search engine
configuration (Elasticsearch)

- The page should load with the "Search fields" tab enabled and the
  DataTable initialized: Sorting and filtering should work. If you
  scroll down the page the floating table header should be correct.
- Switch to the "Bibliographic records" tab. This table should have
  filtering enabled, and the floating table header should work when you
  scroll down the page.
- The same should be true for the "Authorities" tab.
- Return to the "Search fields" tab to confirm that the DataTable is
  still working as expected.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Victor Grousset/tuxayo 2023-09-04 23:45:19 UTC
Created attachment 155206 [details] [review]
Bug 34625: Fix search engine configuration tables header problem

This patch corrects the JavaScript which allows DataTables to be created
and destroyed based on which tab is clicked on the search engine
configuration page. When you click from one tab to the other, the
original tab's DataTable should be destroyed and the new tab's DataTable
initialized.

To test, apply the patch and go to Administration -> Search engine
configuration (Elasticsearch)

- The page should load with the "Search fields" tab enabled and the
  DataTable initialized: Sorting and filtering should work. If you
  scroll down the page the floating table header should be correct.
- Switch to the "Bibliographic records" tab. This table should have
  filtering enabled, and the floating table header should work when you
  scroll down the page.
- The same should be true for the "Authorities" tab.
- Return to the "Search fields" tab to confirm that the DataTable is
  still working as expected.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-09-04 23:45:59 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 6 Tomás Cohen Arazi 2023-09-05 14:53:51 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Galen Charlton 2023-09-06 14:44:21 UTC
Noting that this patch also fixes the problem with saving some search mappings changes that was reported in bug 34504 for 23.05.

As such, a backport would be greatly appreciated!
Comment 8 Nick Clemens 2023-09-07 17:07:30 UTC
*** Bug 34695 has been marked as a duplicate of this bug. ***
Comment 9 Fridolin Somers 2023-09-08 06:17:27 UTC
Pushed to 23.05.x for 23.05.04
Comment 10 Matt Blenkinsop 2023-09-15 09:33:51 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x