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.
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)
Could we get a test plan for this? I'm not sure what has changed or what to look for. Thanks!
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.
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)