Bug 20806: Do not rely on column position

It is not the first time we have this splice call, it seems safer to
rely on the column's name instead of the column's position

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2a369663fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2018-06-29 17:30:39 -03:00 committed by Martin Renvoize
parent a332214dd3
commit f9f270efd6
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@
var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
[% UNLESS show_itemtype_column %]
//Remove item type column settings
columns_settings.splice(8,1);
columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';});
[% END %]
var table = KohaTable("table_holdshistory", {
"sPaginationType": "four_button",