diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm
index 1d9edbbaf1..35deb203d7 100644
--- a/C4/Suggestions.pm
+++ b/C4/Suggestions.pm
@@ -158,16 +158,17 @@ sub SearchSuggestion {
qw( STATUS itemtype suggestedby managedby acceptedby budgetid biblionumber )
)
{
- if ( exists $suggestion->{$field} ) {
- if ( defined $suggestion->{$field} and $suggestion->{$field} ne '' )
- {
- push @sql_params, $suggestion->{$field};
- push @query, qq{ AND suggestions.$field=? };
+ if ( exists $suggestion->{$field}
+ and defined $suggestion->{$field}
+ and $suggestion->{$field} ne '__ANY__'
+ and $suggestion->{$field} ne q||
+ ) {
+ if ( $suggestion->{$field} eq '__NONE__' ) {
+ push @query, qq{ AND (suggestions.$field = '' OR suggestions.$field IS NULL) };
}
else {
- push @query, qq{
- AND (suggestions.$field='' OR suggestions.$field IS NULL)
- };
+ push @sql_params, $suggestion->{$field};
+ push @query, qq{ AND suggestions.$field = ? };
}
}
}
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
index e4b44c25e9..aeb8946bcf 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
@@ -744,7 +744,14 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o