Bug 41022 - In holding table limit the values of each filter to values actually present in items
Summary: In holding table limit the values of each filter to values actually present i...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-15 09:13 UTC by Mathieu Saby
Modified: 2025-10-19 16:50 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Saby 2025-10-15 09:13:07 UTC
Maybe it is difficult or not possible but it would be nice to limit the values for items filters to the values actually present in items for each specific record.

This could be applied to the 4 fields for which a dropdown list is displayed (item type, homebranch, holdingbranch, status)

Ex : you have only 2 items, of item type "book" and "map" => the filter should propose only 2 options ("book" and "map") and not the complete list of item type configured in the system.
Comment 1 Jonathan Druart 2025-10-16 07:36:26 UTC
For libraries and item types - without using elastic for items I don't think we can implement that without performance issues. It would be interesting to know how much time it takes to `select distinct(field) from items where biblionumber=x` when there are a lot of items (10k).

For status - not conceivable (still perf related) without storing the status.
Comment 2 Jonathan Druart 2025-10-16 07:37:34 UTC
(In reply to Jonathan Druart from comment #1)
> For libraries and item types - without using elastic for items I don't think
> we can implement that without performance issues. It would be interesting to
> know how much time it takes to `select distinct(field) from items where
> biblionumber=x` when there are a lot of items (10k).

And there are also the values from the host records that will need to be retrieved.
Comment 3 Mathieu Saby 2025-10-19 16:50:25 UTC
You don't apply a filter immediatly when the table is displayed. Manually you need a few second to get to the filters with your mouse or keyboard.

Would it be possible to hide (in a invisible way) some values of the filters *after* the display of the table ?