Bug 41457 - Hold history table does not deal with column visibility correctly
Summary: Hold history table does not deal with column visibility correctly
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 41456
Blocks:
  Show dependency treegraph
 
Reported: 2025-12-16 12:32 UTC by Jonathan Druart
Modified: 2025-12-16 16:49 UTC (History)
3 users (show)

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


Attachments
Bug 41457: Fix column visibility on the holds history table (8.34 KB, patch)
2025-12-16 12:45 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-12-16 12:32:11 UTC
The "Item type" column is displayed/hidden depending on the syspref AllowHoldItemTypeSelection.

If DT's state is saved and the pref modified, the state will be lost.

We MUST use bKohaColumnsUseNames (columns' name) to make it work correctly.
Comment 1 Jonathan Druart 2025-12-16 12:45:37 UTC
Created attachment 190538 [details] [review]
Bug 41457: Fix column visibility on the holds history table

We must use bKohaColumnsUseNames to correctly deal with the column
visibility if some columns are shown/hidden depending on sysprefs.

On the holds history table we have "item type" that is hidden if
AllowHoldItemTypeSelection is disabled.

Test plan:
1. Create a hold and select an item type
Note: I think there is a bug if you select it from "Hold next available
item", use "Hold details". Please confirm?
2. Go to the holds history view
3. Hide some columns
4. Modify the value of AllowHoldItemTypeSelection
5. Reload the page and notice that the state of the table is restored
   correctly, however the "item type" column is shown or hidden
   depending on the syspref's value.
Comment 2 David Nind 2025-12-16 16:49:38 UTC
This seems to work correctly for me, however no value is shown in the rows for the "Requested item type" column. (Selecting from the dropdown list or using the filters works as expected/)

For step 1, if I select "Request specific item type" (Books):

- from under the "Hold next available item" section, it shows in the patron's holds history as "Any item type" (doesn't matter what I select here)

- from under "Hold details" section, it shows in the patron's holds history as "Book"