Bug 34466

Summary: "Clear filter" always disabled
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: ERMAssignee: Pedro Amorim <pedro.amorim>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38071
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.10
Circulation function:
Attachments: Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue
Bug 34466: Cypress tests
Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue
Bug 34466: Cypress tests
Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue

Description Jonathan Druart 2023-08-03 07:30:12 UTC
The "Clear filter" button of KohaTable in Vue components is always disabled and has no effect when clicked.
Comment 1 Pedro Amorim 2023-08-25 10:39:44 UTC
Created attachment 154799 [details] [review]
Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue
Comment 2 Jonathan Druart 2023-08-30 11:28:53 UTC
Pedro, shouldn't we provide Cypress tests?
Comment 3 Jonathan Druart 2023-08-30 11:31:35 UTC
I think we should reuse the code from js/datatables.js instead, like we do for _dt_visibility, _dt_buttons, _dt_default_ajax, etc.
Comment 4 Pedro Amorim 2023-08-31 16:19:29 UTC
Created attachment 155020 [details] [review]
Bug 34466: Cypress tests
Comment 5 Pedro Amorim 2023-08-31 16:19:31 UTC
Created attachment 155021 [details] [review]
Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue

Test plan:
Apply only the cypress test patch
Run KohaTable_spec.ts
Notice it fails

Apply this patch, repeat
Comment 6 Pedro Amorim 2023-08-31 16:19:59 UTC
Thanks Jonathan I wasn't aware the code be reused directly (doh!)
Comment 7 Jonathan Druart 2023-09-01 08:21:54 UTC
Created attachment 155064 [details] [review]
Bug 34466: Cypress tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2023-09-01 08:21:57 UTC
Created attachment 155065 [details] [review]
Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue

Test plan:
Apply only the cypress test patch
Run KohaTable_spec.ts
Notice it fails

Apply this patch, repeat

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Tomás Cohen Arazi (tcohen) 2023-09-01 14:10:44 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 10 Fridolin Somers 2023-09-08 00:34:25 UTC
Pushed to 23.05.x for 23.05.04
Comment 11 Matt Blenkinsop 2023-09-08 09:47:53 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x