Bug 18967

Summary: Acquisitions receipt search filter is too sticky
Product: Koha Reporter: Chris Slone <cslone>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: andrewfh, jonathan.druart, jsterben, katrin.fischer, marjorie.barry-vila
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 20212    
Bug Blocks:    
Attachments: Receipt Summary Search Filter on First Invoice
Receipt Summary Search Filter on Second Invoice

Description Chris Slone 2017-07-20 17:48:21 UTC
Created attachment 65152 [details]
Receipt Summary Search Filter on First Invoice

When receiving items in the Acquisitions module the search filter on the receipt summary page does not automatically clear out and ends up filtering-out items on all future invoices that are opened. Because the search term persists -even after navigating away from the page, restarting the PC, or clearing the browser cache- and is easy to overlook it can lead to lots of confusion. 

To replicate:
1.) Go to the Acquisitions module and select an open invoice.
2.) Click 'Go to receipt page.'
3.) Enter random text into the 'Pending orders' search filter
4.) Open a different invoice, restart the PC, log-out/in, shut the computer off for a week, whatever
5.) Return to the Receipt summary page on any invoice. The term remains in the filter.
Comment 1 Chris Slone 2017-07-20 17:48:49 UTC
Created attachment 65153 [details]
Receipt Summary Search Filter on Second Invoice
Comment 2 Chris Slone 2017-07-20 17:55:40 UTC
Just for clarity, this happens if the same PC and browser is used (even with different logins). However accessing a Receipt summary from a different PC (or the same PC but from a different browser) with the same login is fine.
Comment 3 Katrin Fischer 2019-02-10 19:07:56 UTC
Hi, I can reproduce the issue. I am torn here, I assume it was thought to be a feature, but maybe storing the search term on the datatables search is a bit too much in some cases?

Chris: time doesn't matter, you need to delete your cookies to make it go away.
Comment 4 Chris Slone 2019-02-11 14:25:51 UTC
(In reply to Katrin Fischer from comment #3)
> Hi, I can reproduce the issue. I am torn here, I assume it was thought to be
> a feature, but maybe storing the search term on the datatables search is a
> bit too much in some cases?
> 
> Chris: time doesn't matter, you need to delete your cookies to make it go
> away.

Thanks, Katrin. We were just manually clearing out the field, but that is also good to know. 

I can see why having the search term persist would be useful in some settings, but perhaps this can be optional (check this box if you want this term to be applied to searches until cleared) and/or made more readily apparent ("No matching records found with your filter. Click here to see all records.)?
Comment 5 Jonathan Druart 2021-02-04 13:52:27 UTC
With bug 20212 the filters' values are now stored in localStorage.

The filters on top of the columns will have the values kept when you come back to the receipt page.