Bug 38116 - Patrons search description should be built from DT's search settings
Summary: Patrons search description should be built from DT's search settings
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 33484 38112
Blocks:
  Show dependency treegraph
 
Reported: 2024-10-08 10:01 UTC by Jonathan Druart
Modified: 2024-10-29 15:35 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38116: Build patron search descriptions using DT's search settings (13.16 KB, patch)
2024-10-09 12:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38116: Build patron search descriptions using DT's search settings (13.28 KB, patch)
2024-10-29 15:35 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-10-08 10:01:00 UTC
We are building a description of the search on top of the patrons search table. But this is not accurate and does not reflect the exact search result that is displayed in the table. This is because column filters can used after we submitted the form (on the left).

We could try to build it using DT's search settings, and it would then even be possible to have it for all tables.
Comment 1 Jonathan Druart 2024-10-09 12:13:18 UTC
Created attachment 172569 [details] [review]
Bug 38116: Build patron search descriptions using DT's search settings

The goal of this patch is to move the construction of the patron search description
to datatables.js in order to make it generic and reusable.

With bug 33484 and the restoration of the state from localStorage or the
URL could lead to confusion when the table is displayed. It could also
be problematic when an hidden column has a search pattern.

Note that if a column has a dropdown list with an option selected AND is hidden,
the description won't display the value but the code (eg. ^CPL$ if
library Centerville is selected)
Comment 2 David Nind 2024-10-27 19:46:00 UTC
Could we get a test plan for this?

I'm not sure what has changed or what to look for.

Thanks!
Comment 3 Jonathan Druart 2024-10-28 10:12:09 UTC
Currently there is a description of the search displayed. It is adjusted when you use the filters on the left or when you click on the the "start with" letters that is on top of the table.

However it's not updated when a filter on the table is used (general search of column filters).

It can lead to confusion, especially with bug 33484 where you can use a link to restore specific state of a table.

A test plan would be:
Use the filter on the left
Use a "start with" letter
=> No change in behaviour
Use the global search filter and the column filters
=> They are appended to the description
Hide columns where you have filter
=> Still in the description. But notice a tiny problem if an option of a dropdown list is selected, code is displayed instead of description. Could be fixed I think, but on a separate bug.
Comment 4 Jonathan Druart 2024-10-29 15:35:43 UTC
Created attachment 173663 [details] [review]
Bug 38116: Build patron search descriptions using DT's search settings

The goal of this patch is to move the construction of the patron search description
to datatables.js in order to make it generic and reusable.

With bug 33484 and the restoration of the state from localStorage or the
URL could lead to confusion when the table is displayed. It could also
be problematic when an hidden column has a search pattern.

Note that if a column has a dropdown list with an option selected AND is hidden,
the description won't display the value but the code (eg. ^CPL$ if
library Centerville is selected)