Bug 21612

Summary: Incorrect GROUP BY in Koha::Virtualshelves
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: fridolin.somers, m.de.rooy, martin.renvoize, nick
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 17258    
Attachments: Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves
Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves
Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves

Description Jonathan Druart 2018-10-18 22:10:28 UTC
Same as
  commit 7e220e0d8f107cce63f32bfaa1919c04b4dea6e2
  Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record

for get_private_shelves, get_public_shelves and get_some_shelves
Comment 1 Jonathan Druart 2018-10-18 22:17:48 UTC
Created attachment 80883 [details] [review]
Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves

'koha_kohadev.me.shelfname' isn't in GROUP BY

Same as
  commit 7e220e0d8f107cce63f32bfaa1919c04b4dea6e2
  Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record

Test plan:
- Add public and privates shelves
- Shares some of them
- List them
=> The correct numbers of shelves must be displayed
Comment 2 Jonathan Druart 2018-10-25 14:45:42 UTC
To test this patch you will need the patches from bug 21610, otherwise you will get another failure when trying to create a new list:
  Incorrect integer value: '' for column 'allow_change_from_others'
Comment 3 Andrew Isherwood 2018-10-25 14:50:54 UTC
Created attachment 81164 [details] [review]
Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves

'koha_kohadev.me.shelfname' isn't in GROUP BY

Same as
  commit 7e220e0d8f107cce63f32bfaa1919c04b4dea6e2
  Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record

Test plan:
- Add public and privates shelves
- Shares some of them
- List them
=> The correct numbers of shelves must be displayed

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Comment 4 Marcel de Rooy 2018-10-26 09:50:12 UTC
Created attachment 81261 [details] [review]
Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves

'koha_kohadev.me.shelfname' isn't in GROUP BY

Same as
  commit 7e220e0d8f107cce63f32bfaa1919c04b4dea6e2
  Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record

Test plan:
- Add public and privates shelves
- Shares some of them
- List them
=> The correct numbers of shelves must be displayed

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Nick Clemens (kidclamp) 2018-10-26 17:20:27 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize (ashimema) 2018-11-06 11:55:51 UTC
Pushed to 18.05.x for 18.05.06
Comment 7 Fridolin Somers 2018-11-28 10:00:45 UTC
I pass for sql modes in 17.11.x