Description
Nick Clemens (kidclamp)
2024-10-03 12:22:20 UTC
Created attachment 172390 [details] [review] Bug 38071: Preparation Move kohaTable's toggleable clear filter button to its own function Created attachment 172391 [details] [review] Bug 38071: Apply kohaTableToggleClearFilter logic to staff holdings table Created attachment 172392 [details] [review] Bug 38071: Apply kohaTableToggleClearFilter logic to patrons table Same reason as the holdings table, this table is initialized at a later time Created attachment 172393 [details] [review] Bug 38071: Add behavior to work with filters Consider column filters values when deciding if the 'clear filter' should be enabled or not. Created attachment 172394 [details] [review] Bug 38071: Make it so that 'clear filter' also clears the filter values 1 - Browse to details record for a biblio with items 2 - Click 'Show filters' 3 - Select/type in some filters 4 - Note 'Clear filters' is grayed out 5 - Try to click it, no response 6 - Apply patches. Repeat (make sure to use the search text input as well as the column filters. 7 - Repeat the same test plan but for the patrons table 8 - Verify all is working as intended I had a go at testing: 1. Everything seems to be working correctly for the patrons area. 2. For the holdings table, I don't think it is working as expected - maybe these should be other bugs to fix them up: 2.1 The standard DataTable header is not shown for the holdings table until "Show filters" is selected (that is: Showing 1 to 4 of 4 entries ------------------------------------- Show 20 entries First Previous1 Next Last Search: _______ Clear filter ....) 2.2 While the "Clear filter" action is no longer greyed out (when used) and now works, actually entering something to filter on no longer seems to work as expected (I'm not sure it worked before the patch either). For example record 162, Intermediate Perl, search for "Midway" results in "No matching records found". 2.3 Dates in the filters (either the DataTables search or in the table column filter) no longer seem to work. For example: start typing 09/04 for either option (In reply to David Nind from comment #6) > I had a go at testing: > > 1. Everything seems to be working correctly for the patrons area. > > 2. For the holdings table, I don't think it is working as expected - maybe > these should be other bugs to fix them up: > 2.1 The standard DataTable header is not shown for the holdings table > until "Show filters" is selected > (that is: > Showing 1 to 4 of 4 entries > ------------------------------------- > Show 20 entries First Previous1 Next Last Search: _______ Clear filter > ....) > 2.2 While the "Clear filter" action is no longer greyed out (when used) > and now works, actually entering something to filter on no longer seems to > work as expected (I'm not sure it worked before the patch either). For > example record 162, Intermediate Perl, search for "Midway" results in "No > matching records found". > 2.3 Dates in the filters (either the DataTables search or in the table > column filter) no longer seem to work. For example: start typing 09/04 for > either option Thank you David, I'm convinced these are all different bugs. 2.1) This is the case before the patches. I don't remember why but I think it was decided to group all of that on the "Show/Hide filters". Not caused by these patches. 2.2) I believe this is because "midway" does not exist on the holdings data. Midway's code is "MPL". Search for "MPL", you'll get Midway. Definitely a separate issue. 2.3) This is a date display problem I think. Not related here. The date displayed is "09/04/2024" but the data contains "2014-09-04". If you search for the latter, you get the results for the former. Created attachment 172444 [details] [review] [ALTERNATIVE PATCH] Bug 38071: Ensure search.dt is triggered I don't really understand why the previous code is not working, but the search.dt event handler is not correctly set when initComplete is passed to the constructor (for instance from the patrons search) Created attachment 172446 [details] [review] Bug 38071: Ensure search.dt is triggered I don't really understand why the previous code is not working, but the search.dt event handler is not correctly set when initComplete is passed to the constructor (for instance from the patrons search) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Joubu's patch is much better than mine. Fixes the issue the correct way and does not go beyond the scope of this bug. (In reply to Nick Clemens (kidclamp) from comment #0) > To recreate: > 1 - Browse to details record for a biblio with items > 2 - Click 'Show filters' > 3 - Select/type in some filters > 4 - Note 'Clear filters' is grayed out > 5 - Try to click it, no response I think this is a different "bug" that was the title describes. I am not sure what you are describing is a bug, it has always worked like that. The "Clear filter" button is not plural, and its purpose is to clean the "global search". If we want it to reset the whole table, it should be on its own bug. But that's not an easy one: we have tables where filters are outside of the table (like ERM's agreements). We could have another "reset all" button, eventually. Created attachment 172494 [details] [review] Bug 38071: Ensure search.dt is triggered I don't really understand why the previous code is not working, but the search.dt event handler is not correctly set when initComplete is passed to the constructor (for instance from the patrons search) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> I've created two "related" bugs - see comment #6 and #7: - Bug 38108 - Staff interface holdings table - table navigation only shows when "Show filters" is selected - Bug 38110 - Staff interface tables with filters - date format needs to be YYYY-MM-DD, need to use authorized value codes Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 |