From f16628e7f1af9a23ac17764e591f4e247e7c76eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sat, 24 Dec 2022 09:20:09 +0100 Subject: [PATCH] Bug 32531: In suggestions, restore Include archived 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. --- suggestion/suggestion.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 0e5ec8f80a..f85b4366ea 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -411,9 +411,8 @@ if ($op=~/else/) { || $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, { -- 2.34.1