Bugzilla – Attachment 185844 Details for
Bug 40709
Status filter will display in wrong column if item-level_itypes is set to bibliographic record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40709: Use data-colname for adding filters
Bug-40709-Use-data-colname-for-adding-filters.patch (text/plain), 2.70 KB, created by
Emily Lamancusa (emlam)
on 2025-08-27 18:32:27 UTC
(
hide
)
Description:
Bug 40709: Use data-colname for adding filters
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-08-27 18:32:27 UTC
Size:
2.70 KB
patch
obsolete
>From 8de375924c79ec5d861eda69bc5b82e4e7be84a4 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 26 Aug 2025 20:17:42 +0000 >Subject: [PATCH] Bug 40709: Use data-colname for adding filters > >To test: >1. Set the 'item-level_itypes' system preference to 'Bibliographic record' >2. Go to any record that contains items and look at the holdings table. >3. Click 'Show filters'. >4. Notice that the Status column doesn't appear to have a filter. >5. APPLY PATCH >6. Try again, the Status filter should appear correctly. Make sure all other filters appear correct. >7. Set 'item-level_itypes' back to 'specific item'. >8. Make sure the filter still appears correctly. Make sure all other filters appear correct. > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > .../tables/items/catalogue_detail.inc | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index fdbfec2cef..b5a93b4a94 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -326,14 +326,17 @@ > return $("#" + tab_id + "_status select").val(); > }; > >- let offset = 2; >- [% UNLESS Koha.Preference('LocalCoverImages') %]offset--;[% END %] >- let filters_options = { >- [offset] : () => all_item_types, >- [offset+1] : () => all_libraries, >- [offset+2] : () => all_libraries, >- [offset+7] : () => all_statuses, >- }; >+ let filters_options = {}; >+ >+ let itype_col = $("#" + tab_id + "_table thead th[data-colname='itype']").index(); >+ let holdingbranch_col = $("#" + tab_id + "_table thead th[data-colname='holdingbranch']").index(); >+ let homebranch_col = $("#" + tab_id + "_table thead th[data-colname='homebranch']").index(); >+ let status_col = $("#" + tab_id + "_table thead th[data-colname='status']").index(); >+ >+ if ( itype_col >= 0 ) filters_options[itype_col] = () => all_item_types; >+ if ( holdingbranch_col >= 0 ) filters_options[holdingbranch_col] = () => all_libraries; >+ if ( homebranch_col >= 0 ) filters_options[homebranch_col] = () => all_libraries; >+ if ( status_col >= 0 ) filters_options[status_col] = () => all_statuses; > > var items_table = $("#" + tab_id + '_table').kohaTable({ > ajax: { url: item_table_url }, >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40709
:
185804
|
185805
|
185806
| 185844