Bug 16325 - Suggestions: Tab "Status unknown" contains all suggestions
Summary: Suggestions: Tab "Status unknown" contains all suggestions
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-22 06:44 UTC by Marc Véron
Modified: 2016-12-05 21:25 UTC (History)
3 users (show)

See Also:
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 (165.63 KB, image/png)
2016-04-22 06:44 UTC, Marc Véron
Details
Bug 16325: Add a test for SearchSuggestions when searching for STATUS='' (1.16 KB, patch)
2016-05-03 15:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16325: Do not return all suggestions if search for STATUS='' (1.63 KB, patch)
2016-05-03 15:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16325: Add a test for SearchSuggestions when searching for STATUS='' (1.37 KB, patch)
2016-05-03 15:34 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16325: Do not return all suggestions if search for STATUS='' (1.79 KB, patch)
2016-05-03 15:36 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 16325: Add a test for SearchSuggestions when searching for STATUS='' (1.43 KB, patch)
2016-05-05 20:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 16325: Do not return all suggestions if search for STATUS='' (1.85 KB, patch)
2016-05-05 20:18 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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