Bug 23565

Summary: Add columns configuration and export options to item search results
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: barbara.johnson, bwsdonna, caroline.cyr-la-rose, emily.lamancusa, fridolin.somers, jzairo, katrin.fischer, kelly, lisette.scheer, lucas, marjorie.barry-vila, mathsabypro, mspinney, testopia
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13823
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 23543, 23575    
Bug Blocks:    

Description Owen Leonard 2019-09-06 16:39:57 UTC
As we add more options to item search the output gets more crowded. Adding column configuration would let the library choose to hide some of the columns in item search results.

Question: Should this make the "Export results to CSV" option obsolete? The "Export results to CSV" button automatically exports all results. The DataTables export button exports only visible results.
Comment 1 Katrin Fischer 2019-09-08 20:09:49 UTC
I think exporting all results on demand is nice and removing it without replacement might be seen as a regression :( If we can't achieve this with the datatables, maybe we should relabel the current option and still offer it?
Comment 2 Owen Leonard 2019-09-10 13:14:09 UTC
This has proved to be more difficult than I anticipated. The item search results table has column filters in the header, added via the jquery.dataTables.columnFilter.js plugin. As far as I can tell this plugin uses the index of the column to define the scope of the search. It looks like hiding columns changes the structure of the table in a way that the plugin can't keep track of which column is which.

I don't know where this plugin came from... I've found older versions online, and slighly newer forks, but nothing up to date with the latest DataTables. I haven't dug into the plugin's code, so I don't know how difficult it would be to address the column index problem.
Comment 3 Fridolin Somers 2019-09-19 15:58:06 UTC
(In reply to Owen Leonard from comment #0)
> Question: Should this make the "Export results to CSV" option obsolete? The
> "Export results to CSV" button automatically exports all results. The
> DataTables export button exports only visible results.

A lot of our librarians use this to manage the collections.
Showing all results before exporting may take a long time and end in timeout.
Comment 4 Owen Leonard 2022-03-16 11:48:56 UTC
*** Bug 27156 has been marked as a duplicate of this bug. ***
Comment 5 Owen Leonard 2022-10-25 18:52:22 UTC
*** Bug 31975 has been marked as a duplicate of this bug. ***
Comment 6 Caroline Cyr La Rose 2023-09-25 14:06:53 UTC
(In reply to Owen Leonard from comment #0)
> Question: Should this make the "Export results to CSV" option obsolete? The
> "Export results to CSV" button automatically exports all results. The
> DataTables export button exports only visible results.

Maybe keep it but rename to "Export all results to CSV"?
Comment 7 Katrin Fischer 2023-11-07 21:54:33 UTC
*** Bug 35282 has been marked as a duplicate of this bug. ***