Bug 23565 - Add columns configuration and export options to item search results
Summary: Add columns configuration and export options to item search results
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 6 votes (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 27156 (view as bug list)
Depends on: 23543 23575
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-06 16:39 UTC by Owen Leonard
Modified: 2022-09-30 15:49 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***