Bug 28216: Fix vendor list group by in serials statistics wizard
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 26 Apr 2021 07:40:08 +0000 (09:40 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 14 Dec 2021 19:38:10 +0000 (09:38 -1000)
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
reports/serials_stats.pl

index a3b12b5..f0c1505 100755 (executable)
@@ -135,6 +135,7 @@ if($do_it){
     my $sth = $dbh->prepare("SELECT aqbooksellerid, aqbooksellers.name 
                                 FROM subscription 
                                   LEFT JOIN aqbooksellers ON (subscription.aqbooksellerid=aqbooksellers.id ) 
+                                GROUP BY aqbooksellerid, aqbooksellers.name
                                 ORDER BY aqbooksellers.name ASC
                                ");
     $sth->execute();