Skip to content

Commit

Permalink
Bug 32531: Restore behaviour of 'include archived' filter
Browse files Browse the repository at this point in the history
In Suggestions management, there is a sidebar menu to organize and
filter suggestions. In the "Suggestion information" filter section,
there is a checkbox "Include archived". When this box us unchecked, the
archived suggestions are not displayed. When this box is checked, all
suggestions are displayed, archived, and not archived. This is not the
case anymore, only archived suggestions are displayed, supposedly since
patch for bug 23991.

TO TEST:

1. On a Koha installation remove all suggestions (in the table).
2. Create two suggestions. Archive one of them.
3. Check/Uncheck filter 'Include Archived'. Confirm that when the box is
   checked, you don't see anymore the unarchived suggestion.
4. Apply the patch.
5. Repeat 3, and confirm that the filter operates properly.

Signed-off-by: Katrin Fischer <[email protected]>

Signed-off-by: Jonathan Druart <[email protected]>
Signed-off-by: Tomas Cohen Arazi <[email protected]>
  • Loading branch information
fredericd authored and tomascohen committed Jan 5, 2023
1 parent 0e8f28b commit cf04403
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions suggestion/suggestion.pl
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,8 @@ sub GetCriteriumDesc{
|| $search_params->{$f} eq '';
}

my @suggestions =
Koha::Suggestions->search_limited(
{ %$search_params, archived => $filter_archived } )->as_list;
$search_params->{archived} = 0 if !$filter_archived;
my @suggestions = Koha::Suggestions->search_limited($search_params)->as_list;

push @allsuggestions,
{
Expand Down

0 comments on commit cf04403

Please sign in to comment.