Bugzilla – Attachment 51160 Details for
Bug 16325
Suggestions: Tab "Status unknown" contains all suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16325: Do not return all suggestions if search for STATUS=''
Bug-16325-Do-not-return-all-suggestions-if-search-.patch (text/plain), 1.79 KB, created by
Marc Véron
on 2016-05-03 15:36:09 UTC
(
hide
)
Description:
Bug 16325: Do not return all suggestions if search for STATUS=''
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-05-03 15:36:09 UTC
Size:
1.79 KB
patch
obsolete
>From 91bdd116076c5cb7bc66ca335e949ad4b7cc121d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 3 May 2016 16:13:44 +0100 >Subject: [PATCH] Bug 16325: Do not return all suggestions if search for > STATUS='' >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This is a quick and dirty way to fix a bad bug in a messy area. >The "unknown status" tab in the suggestions table display all the >suggestions. It should only display suggestions with a STATUS='' > >Test plan: >- Create some suggestions >- Go to Home > Acquisitions > Suggestions management >- Edit some suggestions and give them different status, >e.g. accepted, rejected, pending. >- Verify that they appear in the tabs as appropriate >- Edit one suggestion, set "Mark selected as" to --Choose a status-- >=> Without this patch: New tab "Status unknown" containing all >suggestions >=> With this patch: tab contains only suggestions with "Unknown status" > >Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/Suggestions.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index 63e10ed..8e76cea 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -160,7 +160,10 @@ sub SearchSuggestion { > if ( exists $suggestion->{$field} > and defined $suggestion->{$field} > and $suggestion->{$field} ne '__ANY__' >- and $suggestion->{$field} ne q|| >+ and ( >+ $suggestion->{$field} ne q|| >+ or $field eq 'STATUS' >+ ) > ) { > if ( $suggestion->{$field} eq '__NONE__' ) { > push @query, qq{ AND (suggestions.$field = '' OR suggestions.$field IS NULL) }; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16325
:
50562
|
51153
|
51154
|
51159
|
51160
|
51259
|
51260