@@ -, +, @@
fund
---
C4/Suggestions.pm | 17 +++----
.../prog/en/modules/suggestion/suggestion.tt | 9 +++-
t/db_dependent/Suggestions.t | 56 ++++++++++++++++++++--
3 files changed, 68 insertions(+), 14 deletions(-)
--- a/C4/Suggestions.pm
+++ a/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 = ? };
}
}
}
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
@@ -743,7 +743,14 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o