Bug 17053 Clearing search term in Reports

If you click the clear button to clear the search term it does take the search
term away. However, the next time you click on "Saved reports" the search term
is still there.

TO TEST:

1. Reports > Use saved
2. Filter on anything (date/author/keyword). Let say "foo" in keyword.
3. Click the Clear link on the Filter form. You can see that "foo" is removed
   from keyword, and all the saved reports are displayed.
4. Click "Saved Reports" on the left. You can see that "foo" reappears in
   keyword filter.
5. Apply the patch, and repeat steps 2-4.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Frédéric Demians 2016-08-06 10:13:18 +02:00 committed by Kyle M Hall
parent 06d1259e56
commit aa0e27ea08

View file

@ -73,7 +73,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
my $session = $cookie ? get_session($cookie->value) : undef; my $session = $cookie ? get_session($cookie->value) : undef;
my $filter; my $filter;
if ( $input->param("filter_set") ) { if ( $input->param("filter_set") or $input->param('clear_filters') ) {
$filter = {}; $filter = {};
$filter->{$_} = $input->param("filter_$_") foreach qw/date author keyword group subgroup/; $filter->{$_} = $input->param("filter_$_") foreach qw/date author keyword group subgroup/;
$session->param('report_filter', $filter) if $session; $session->param('report_filter', $filter) if $session;