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.
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.
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"
Created attachment 190612 [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.
(In reply to David Nind from comment #2) > 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/) Oops yes, last minute change, again!
Created attachment 190656 [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. Signed-off-by: David Nind <david@davidnind.com>
I've signed off, and I think it is working correctly. However: 1. If I apply the patch and set AllowHoldItemTypeSelection = Allow. 2. If I try and hide the "Requested item type" column either by using the table configuration settings or the columns option, it works for that one time. 3. When I go to another page, and then go back to the patron's holds history page, it is then shown again. 4. I'm assuming this is to do with either of the "Save configuration state on page change" and "Save search state on page change" configuration settings, but I've never spent any time trying to figure out what they mean. 5. If I set AllowHoldItemTypeSelection = Don't allow, the column "Requested item type" is not shown in either the columns dropdown list, and whatever is set with the table configuration does not have any effect.
(In reply to Jonathan Druart from comment #4) > (In reply to David Nind from comment #2) > > 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/) > > Oops yes, last minute change, again! A value is now shown in the "Requested item type" column.
QA script complains: missing_filter at line 178 ( const show_itemtype_column = [% Koha.Preference('AllowHoldItemTypeSelection') ? 1 : 0 %];)
Created attachment 190704 [details] [review] Bug 41457: Add missing html filter Patch from commit c750270
Created attachment 192276 [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. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 192277 [details] [review] Bug 41457: Add missing html filter Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>