Bug 28216 - Fix vendor list group by in serials statistics wizard
Summary: Fix vendor list group by in serials statistics wizard
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 24940
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-26 07:33 UTC by Fridolin Somers
Modified: 2022-01-04 14:20 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
This fixes an issue where vendors are repeated in the serials report.
Version(s) released in:
22.05.00,21.05.08


Attachments
Bug 28216: Fix vendor list group by in serials statistics wizard (1.25 KB, patch)
2021-04-26 07:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28216: Fix vendor list group by in serials statistics wizard (1.25 KB, patch)
2021-05-10 07:39 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28216: Fix vendor list group by in serials statistics wizard (1.27 KB, patch)
2021-09-29 09:26 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28216: Fix vendor list group by in serials statistics wizard (1.33 KB, patch)
2021-12-12 20:22 UTC, Samu Heiskanen
Details | Diff | Splinter Review
Bug 28216: Fix vendor list group by in serials statistics wizard (1.40 KB, patch)
2021-12-13 13:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-04-26 07:33:37 UTC
Bug 24940 added sort vendor list by aqbookseller.name but removed accidentally the group by.
Now vendors are repeated in the list.
Comment 1 Fridolin Somers 2021-04-26 07:43:11 UTC
Created attachment 120163 [details] [review]
Bug 28216: Fix vendor list group by in serials statistics wizard

Bug 24940 added sort vendor list by aqbookseller.name but removed accidentally the group by.
Now vendors are repeated in the list.

Test plan :
1) Create several subscriptions for same vendor
2) Go to Reports > Serials
3) Check list of vendors
=> Without patch you see the same vendor several times
=> With patch you seen it once
4) Check sort is still on vendor name
Comment 2 Owen Leonard 2021-05-07 12:54:47 UTC
I get an error:

Plack::App::WrapCGI::call(): DBI Exception: DBD::mysql::st execute failed: 'koha_kohadev.subscription.aqbooksellerid' isn't in GROUP BY [for Statement "SELECT aqbooksellerid, aqbooksellers.name 
                                FROM subscription 
                                  LEFT JOIN aqbooksellers ON (subscription.aqbooksellerid=aqbooksellers.id ) 
                                GROUP BY aqbooksellers.id
                                ORDER BY aqbooksellers.name ASC
				"] at /usr/share/perl5/Plack/Component.pm line 50
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
Comment 3 Fridolin Somers 2021-05-10 07:37:03 UTC
Oh I see
Comment 4 Fridolin Somers 2021-05-10 07:39:30 UTC
Created attachment 120755 [details] [review]
Bug 28216: Fix vendor list group by in serials statistics wizard

Bug 24940 added sort vendor list by aqbookseller.name but removed accidentally the group by.
Now vendors are repeated in the list.

Test plan :
1) Create several subscriptions for same vendor
2) Go to Reports > Serials
3) Check list of vendors
=> Without patch you see the same vendor several times
=> With patch you seen it once
4) Check sort is still on vendor name
Comment 5 Hinet Romain 2021-09-06 15:27:48 UTC
I have a message "Error trace" when i click to "Serials statistics wizard"
https://staff-amu.sandboxes.biblibre.eu/cgi-bin/koha/reports/serials_stats.pl
Comment 6 Hinet Romain 2021-09-29 08:28:55 UTC
Hi,
Without the patch I have the same message error trace, when clic to "serial statistics wizards
https://staff-amu.sandboxes.biblibre.eu/cgi-bin/koha/reports/serials_stats.pl
Comment 7 Fridolin Somers 2021-09-29 09:25:35 UTC
Ah another mistake :
DBD::mysql::st execute failed: 'aqbooksellers.name' isn't in GROUP BY
Comment 8 Fridolin Somers 2021-09-29 09:26:32 UTC
Created attachment 125446 [details] [review]
Bug 28216: Fix vendor list group by in serials statistics wizard

Bug 24940 added sort vendor list by aqbookseller.name but removed accidentally the group by.
Now vendors are repeated in the list.

Test plan :
1) Create several subscriptions for same vendor
2) Go to Reports > Serials
3) Check list of vendors
=> Without patch you see the same vendor several times
=> With patch you seen it once
4) Check sort is still on vendor name
Comment 9 Samu Heiskanen 2021-12-12 20:22:19 UTC
Created attachment 128424 [details] [review]
Bug 28216: Fix vendor list group by in serials statistics wizard

Bug 24940 added sort vendor list by aqbookseller.name but removed accidentally the group by.
Now vendors are repeated in the list.

Test plan :
1) Create several subscriptions for same vendor
2) Go to Reports > Serials
3) Check list of vendors
=> Without patch you see the same vendor several times
=> With patch you seen it once
4) Check sort is still on vendor name

Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi>
Comment 10 Jonathan Druart 2021-12-13 13:38:54 UTC
Created attachment 128462 [details] [review]
Bug 28216: Fix vendor list group by in serials statistics wizard

Bug 24940 added sort vendor list by aqbookseller.name but removed accidentally the group by.
Now vendors are repeated in the list.

Test plan :
1) Create several subscriptions for same vendor
2) Go to Reports > Serials
3) Check list of vendors
=> Without patch you see the same vendor several times
=> With patch you seen it once
4) Check sort is still on vendor name

Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Fridolin Somers 2021-12-14 19:49:39 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 12 Andrew Fuerste-Henry 2021-12-17 20:57:27 UTC
Pushed to 21.05.x for 21.05.08
(looks like this is in 21.11 but not noted here yet)
Comment 13 Victor Grousset/tuxayo 2021-12-22 22:03:34 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.