Bug 38958 - Search history deletion broken in the staff interface
Summary: Search history deletion broken in the staff interface
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 36640
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-23 16:11 UTC by Owen Leonard
Modified: 2025-01-24 15:15 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes deleting catalog search history in the staff interface (when the EnableSearchHistory system preference is set to 'Keep') - the delete button now works. Previously, selected search terms could not be deleted. (This is related to the DataTables upgrade in Koha 24.11.)
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 38958: Search history deletion broken in the staff interface (2.59 KB, patch)
2025-01-23 16:28 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38958: Search history deletion broken in the staff interface (2.64 KB, patch)
2025-01-23 18:04 UTC, David Nind
Details | Diff | Splinter Review
Bug 38958: Search history deletion broken in the staff interface (2.73 KB, patch)
2025-01-24 10:34 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2025-01-23 16:11:08 UTC
Since the DataTables upgrade it has not been possible check checkboxes for a search history entry and delete them. The delete button doesn't become enabled when you check a box.
Comment 1 Owen Leonard 2025-01-23 16:28:35 UTC
Created attachment 177065 [details] [review]
Bug 38958: Search history deletion broken in the staff interface

There is some JS on the staff interface search history page which uses a
jQuery selector that doesn't seem to work after the DataTables upgrade.
This patch fixes it.

To test, apply the patch and enable EnableSearchHistory if necessary.

- In the staff interface, perform a few catalog searches if necessary.
- Choose "Search history" from the user menu in the upper right.
- In the table of searches, check the checkbox next to one or more
  search history entries.
- The delete button at the top of the table should become enabled.
- Clicking the delete button should work correctly to delete your
  selected searches.
Comment 2 David Nind 2025-01-23 18:04:04 UTC
Created attachment 177066 [details] [review]
Bug 38958: Search history deletion broken in the staff interface

There is some JS on the staff interface search history page which uses a
jQuery selector that doesn't seem to work after the DataTables upgrade.
This patch fixes it.

To test, apply the patch and enable EnableSearchHistory if necessary.

- In the staff interface, perform a few catalog searches if necessary.
- Choose "Search history" from the user menu in the upper right.
- In the table of searches, check the checkbox next to one or more
  search history entries.
- The delete button at the top of the table should become enabled.
- Clicking the delete button should work correctly to delete your
  selected searches.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2025-01-24 10:34:03 UTC
Created attachment 177102 [details] [review]
Bug 38958: Search history deletion broken in the staff interface

There is some JS on the staff interface search history page which uses a
jQuery selector that doesn't seem to work after the DataTables upgrade.
This patch fixes it.

To test, apply the patch and enable EnableSearchHistory if necessary.

- In the staff interface, perform a few catalog searches if necessary.
- Choose "Search history" from the user menu in the upper right.
- In the table of searches, check the checkbox next to one or more
  search history entries.
- The delete button at the top of the table should become enabled.
- Clicking the delete button should work correctly to delete your
  selected searches.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Katrin Fischer 2025-01-24 15:15:30 UTC
Pushed for 25.05!

Well done everyone, thank you!