Bug 39691

Summary: Searches duplicated in search history if I change the sort order
Product: Koha Reporter: kristinamason
Component: SearchingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
URL: http://localhost:8080/cgi-bin/koha/opac-search-history.pl
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: A list showing duplicate searches

Description kristinamason 2025-04-19 05:34:39 UTC
Created attachment 181199 [details]
A list showing duplicate searches

Issue: My search history shows the same search multiple times if I change the sort order. 

To reproduce: 
1. Log in as a user http://localhost:8080
2. Search the catalogue for something
3. On the search results page, choose a different sort order for your results (doesn't matter what, do it a few times, A-Z, Z-A, etc). 
4. Go to the search history page http://localhost:8080/cgi-bin/koha/opac-search-history.pl
5. Note that the search shows more than once, one for each time you change the sort order.

Expectation: The search should only show once, and not register multiple times due to just changing the order of it. The search history page doesn't indicate this either, so it just looks like the same search over and over. 

Screenshot attached showing 3 searches all from 5:25. In reality I did one search and just changed the order.
Comment 1 kristinamason 2025-04-19 05:39:37 UTC
Alternatively, the search history could show the sort order on the page, so it's clear what each search was involving.