[Koha-bugs] [Bug 32447] In items table barcode column can not be filtered

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 3 20:25:04 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32447

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #147685|0                           |1
        is obsolete|                            |

--- Comment #16 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 147730
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147730&action=edit
Bug 32447: Fix DataTable filtering when hidden columns are in place

The bibliographic record's details page in the Staff interface
includes a 'Holdings' table at the bottom with information for
each item attached to the record. When activating the filters
in this table, there is no input field for the barcode column
but just bold text.

This broke in v22.11.00, the related commit being 018a981b9b
from Bug 29282 where two new hidden columns were added to that
table.

We can fix this by taking advantage of the existing code in
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
(introduced by commit dfb7af91af6 from Bug 23307) which allows
us to create and hook our own custom columnsInit() function in
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
to redraw the DataTable filters upon page load if a column is
marked as 'is_hidden: 1' in admin/columns_settings.yml, or if
a column is added/removed via the "⚙ Columns" button (both
are handled by the DataTables column-visibility.dt event).

Redrawing the filters via the above method also fixes the
issue described in Bug 32448.

Test plan:

1) Confirm the erratic DataTable behaviour outlined above
2) Apply this patch and reload all JS assets (hit CTRL-F5)
3) Confirm that you now see the correct input text field
   for the 'Barcode' column
4) Confirm that you can search for barcodes or in any other
   column successfully
5) Try toggling the visibility of the columns and making as
   many search variations as possible -- it should all now
   work without any glitches!

For extra credit ;-) you can also test the 'Other holdings'
table by setting the SeparateHoldings SysPref to 'Separate'.

Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list