Bug 37830

Summary: Provide ability to filter holdings in OPAC holdings table
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: OPACAssignee: Pedro Amorim <pedro.amorim>
Status: RESOLVED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: bernard.scaife, david, lucas, lucy.vaux-harvey, martin.renvoize, pedro.amorim
Version: MainKeywords: Sandbox
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 37830: Add ability to filter holdings in OPAC
Bug 37830: Add ability to filter holdings in OPAC
Bug 37830: Add ability to filter holdings in OPAC

Description Pedro Amorim 2024-09-04 13:04:07 UTC

    
Comment 1 Pedro Amorim 2024-09-04 13:06:28 UTC
Created attachment 171024 [details] [review]
Bug 37830: Add ability to filter holdings in OPAC

Test plan:
1) Visit any OPAC biblio page, ktd:
opac_url/cgi-bin/koha/opac-detail.pl?biblionumber=336
2) Notice a new "Search holdings" input on top of the holdings table
3) Type something in the input, notice it filters rows
4) Clear the filter, notice all rows show
Comment 2 David Nind 2024-09-04 13:57:34 UTC
Created attachment 171031 [details] [review]
Bug 37830: Add ability to filter holdings in OPAC

Test plan:
1) Visit any OPAC biblio page, ktd:
opac_url/cgi-bin/koha/opac-detail.pl?biblionumber=336
2) Notice a new "Search holdings" input on top of the holdings table
3) Type something in the input, notice it filters rows
4) Clear the filter, notice all rows show

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Pedro Amorim 2024-10-07 10:07:32 UTC
Created attachment 172450 [details] [review]
Bug 37830: Add ability to filter holdings in OPAC

Test plan:
1) Visit any OPAC biblio page, ktd:
opac_url/cgi-bin/koha/opac-detail.pl?biblionumber=336
2) Notice a new "Search holdings" input on top of the holdings table
3) Type something in the input, notice it filters rows
4) Clear the filter, notice all rows show

Sponsored-by: NHS England

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Lucas Gass (lukeg) 2024-10-07 17:12:22 UTC
Pedro,

Is there any reason to not use DataTable's native filter? 


                dom: '<"row-filter"><"clear">lf',
Comment 5 Pedro Amorim 2024-10-29 15:39:48 UTC
(In reply to Lucas Gass (lukeg) from comment #4)
> Pedro,
> 
> Is there any reason to not use DataTable's native filter? 
> 
> 
>                 dom: '<"row-filter"><"clear">lf',

Other than not knowing about it, no reason at all! I've taken a look at this and works very well (and much better than my original patch). I'll revisit. Thanks!
Comment 6 Martin Renvoize (ashimema) 2024-12-12 16:23:23 UTC
I imagine you've not had a moment to get back to this one yet?
Comment 7 Pedro Amorim 2025-01-24 18:15:23 UTC
Hi all, our requirements for this particular holdings table search input have grown to customer specific customizations beyond what the datatable search input provides.
For this reason I've decided to have my own JavaScript in opacuserjs for this particular use case, for now.
I'll follow-up here if community feels this is very valuable to be in core, otherwise I won't proceed with it here.
Comment 8 Katrin Fischer 2025-01-27 15:33:52 UTC
(In reply to Pedro Amorim from comment #7)
> Hi all, our requirements for this particular holdings table search input
> have grown to customer specific customizations beyond what the datatable
> search input provides.
> For this reason I've decided to have my own JavaScript in opacuserjs for
> this particular use case, for now.
> I'll follow-up here if community feels this is very valuable to be in core,
> otherwise I won't proceed with it here.

I have to admit that gets me curious about the use case :) 


Maybe only wondering if we could still use this bug with obsoleted patch to do the datatables standard search filter? This could still be useful for libraries with a lot of items on different branches.