From 4fad5a7a6ba33d01b3fe2d93a2dbc84c557e564a Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 18 Mar 2013 15:40:02 +0000 Subject: [PATCH] Bug 9117 [Follow-up] Fix group and subgroup filtering When a group code is contained in another group code (e.g. 'COD' and 'CODE'), filtering on the longest ('CODE') include reports of the smallest ('COD'). Same problem for the subgroups. This patch fixes this. Signed-off-by: Katrin Fischer Signed-off-by: Jared Camins-Esakov --- .../prog/en/modules/reports/guided_reports_start.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index e542b85bb5..855fc36970 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -95,7 +95,7 @@ $(document).ready(function(){ var g_id = $(ui.tab).attr('id') var g_name = $(ui.tab).text(); if (g_id && g_id.length > 0) { - rtable.fnFilter(g_name, 3); + rtable.fnFilter('^' + g_name + '$', 3, true, true, true, false); rtable.fnSetColumnVis(3, false); for(var i in group_subgroups[g_id]) { $("#subgroup_filter").append( @@ -115,7 +115,7 @@ $(document).ready(function(){ var sg_id = $(selected).val(); var sg_name = $(selected).text(); if (sg_id.length > 0) { - rtable.fnFilter(sg_name, 4); + rtable.fnFilter('^' + sg_name + '$', 4, true, true, true, false); rtable.fnSetColumnVis(4, false); } else { rtable.fnFilter('', 4); -- 2.39.5