Bug 16325

Summary: Suggestions: Tab "Status unknown" contains all suggestions
Product: Koha Reporter: Marc Véron <veron>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: brendan, jonathan.druart, julian.maurice
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Screenshot with tab "Status unknown" displaying all suggestions
Bug 16325: Add a test for SearchSuggestions when searching for STATUS=''
Bug 16325: Do not return all suggestions if search for STATUS=''
Bug 16325: Add a test for SearchSuggestions when searching for STATUS=''
Bug 16325: Do not return all suggestions if search for STATUS=''
[PASSED QA] Bug 16325: Add a test for SearchSuggestions when searching for STATUS=''
[PASSED QA] Bug 16325: Do not return all suggestions if search for STATUS=''

Description Marc Véron 2016-04-22 06:44:25 UTC
Created attachment 50562 [details]
Screenshot with tab "Status unknown" displaying all suggestions

To reproduce:
- Test on Top of Bug 16322 for better visualization
- 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--
- Result: New tab "Status unknown" containing all suggestions 
  (expected: tab contains only suggestion with "Unknown status")

See screenshot attached.
Comment 1 Jonathan Druart 2016-05-03 15:16:55 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-05-03 15:16:58 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2016-05-03 15:34:38 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2016-05-03 15:36:09 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2016-05-05 20:17:52 UTC
Created attachment 51259 [details] [review]
[PASSED QA] Bug 16325: Add a test for SearchSuggestions when searching for STATUS=''

Test fails as expected without second patch and passes OK with second patch.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2016-05-05 20:18:20 UTC
Created attachment 51260 [details] [review]
[PASSED QA] Bug 16325: Do not return all suggestions if search for STATUS=''

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>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Brendan Gallagher 2016-05-05 20:46:51 UTC
Pushed to Master - Should be in the May 2016 Release.  

Thanks!
Comment 8 Julian Maurice 2016-05-16 11:24:40 UTC
Patch pushed to 3.22.x, will be in 3.22.7