Bug 11833 - fix filtering on saved report subgroup
authorOwen Leonard <oleonard@myacpl.org>
Tue, 25 Feb 2014 20:55:03 +0000 (15:55 -0500)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 6 Jun 2014 13:29:46 +0000 (09:29 -0400)
Filtering the list of saved reports by subgroup doesn't work because the
filtering JavaScript was not updated when the table columns changed with
Bug 3134. This patch corrects the target column for filtering.

To test you must have multiple saved reports within one group, and at
least one of those in a subgroup.

- Apply the patch and go to Reports -> Use saved.
- Click the tab for the group which contains your reports.
- Choose the subgroup you want to filter on from the subgroup dropdown.

The list of reports should be correctly filtered by your subgroup.

NOTE: It seems weird to have the number of columns displayed change
      when filtered, but this patch does correct the filtering.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0039eee40c6f70023bfb93e8d3d011b47da6867a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit aa9ab3336653d079dab10f16c08ba4f4fa713f6a)

koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

index 9cb99f3..b94f91e 100644 (file)
@@ -115,11 +115,11 @@ $(document).ready(function(){
         var sg_id = $(selected).val();
         var sg_name = $(selected).text();
         if (sg_id.length > 0) {
-            rtable.fnFilter('^' + sg_name + '$', 4, true, true, true, false);
-            rtable.fnSetColumnVis(4, false);
+            rtable.fnFilter('^' + sg_name + '$', 5, true, true, true, false);
+            rtable.fnSetColumnVis(5, false);
         } else {
-            rtable.fnFilter('', 4);
-            rtable.fnSetColumnVis(4, true);
+            rtable.fnFilter('', 5);
+            rtable.fnSetColumnVis(5, true);
         }
     });
 [% END %]