Bug 41457

Summary: Hold history table does not deal with column visibility correctly
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, gmcharlt, kyle
Version: unspecified   
Hardware: All   
OS: All   
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:
Bug Depends on: 41456    
Bug Blocks:    
Attachments: Bug 41457: Fix column visibility on the holds history table

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"