Bug 24940 - Serials statistics wizard: order vendor list alphabetically
Summary: Serials statistics wizard: order vendor list alphabetically
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: David Roberts
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 17258 28216
  Show dependency treegraph
 
Reported: 2020-03-22 22:33 UTC by Katrin Fischer
Modified: 2021-04-26 07:33 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11
Circulation function:


Attachments
Bug 24940: Serials statistics wizard: order vendor list alphabetically (1.36 KB, patch)
2020-04-03 15:28 UTC, David Roberts
Details | Diff | Splinter Review
Bug 24940: Serials statistics wizard: order vendor list alphabetically (1.41 KB, patch)
2020-04-04 20:13 UTC, Devinim
Details | Diff | Splinter Review
Bug 24940: Serials statistics wizard: order vendor list alphabetically (1.48 KB, patch)
2020-04-08 08:11 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 Katrin Fischer 2020-03-22 22:33:51 UTC
Currently the vendor pull down in the serials statistics wizard appears to be ordered by vendor id instead of sorting alphabetically by vendor name. This is quite confusing for a longer list.

To test:
- Add at least 2 vendors: 
 - First: Zzzz
 - Second: Aaaa
- Add subscriptions for each of the vendors
- Check the pull down in the serials statistics wizard
- Verify it lists them as Zzzz, Aaaa
Comment 1 David Roberts 2020-04-03 15:28:02 UTC
Created attachment 102390 [details] [review]
Bug 24940: Serials statistics wizard: order vendor list alphabetically

This patch changes the dropdown from being sorted by aqbookseller.id to
aqbookseller.name

To test:
1) Add at least 2 vendors:
 - First: ZZZZ
 - Second: AAAA
2) Add subscriptions for each of the vendors
3) Check the pull down in the serials statistics wizard and verify it
lists them as ZZZZ, AAAA
4) Apply the patch
5) Re-check the pull down in the wizard and check that the vendors are
now listed AAAA,ZZZZ
Comment 2 Devinim 2020-04-04 20:13:25 UTC
Created attachment 102401 [details] [review]
Bug 24940: Serials statistics wizard: order vendor list alphabetically

This patch changes the dropdown from being sorted by aqbookseller.id to
aqbookseller.name

To test:
1) Add at least 2 vendors:
 - First: ZZZZ
 - Second: AAAA
2) Add subscriptions for each of the vendors
3) Check the pull down in the serials statistics wizard and verify it
lists them as ZZZZ, AAAA
4) Apply the patch
5) Re-check the pull down in the wizard and check that the vendors are
now listed AAAA,ZZZZ

It worked as described.

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Comment 3 David Roberts 2020-04-04 22:47:55 UTC
Thanks Devinim! :-)
Comment 4 Jonathan Druart 2020-04-08 08:11:32 UTC
And it even fixes a SQL error (with strict modes on)

DBD::mysql::st execute failed: 'koha_kohadev.aqbooksellers.name' isn't in GROUP BY [for Statement "SELECT aqbooksellerid, aqbooksellers.name
                                FROM subscription
                                  LEFT JOIN aqbooksellers ON (subscription.aqbooksellerid=aqbooksellers.id )
                                GROUP BY aqbooksellerid
Comment 5 Jonathan Druart 2020-04-08 08:11:59 UTC
Created attachment 102533 [details] [review]
Bug 24940: Serials statistics wizard: order vendor list alphabetically

This patch changes the dropdown from being sorted by aqbookseller.id to
aqbookseller.name

To test:
1) Add at least 2 vendors:
 - First: ZZZZ
 - Second: AAAA
2) Add subscriptions for each of the vendors
3) Check the pull down in the serials statistics wizard and verify it
lists them as ZZZZ, AAAA
4) Apply the patch
5) Re-check the pull down in the wizard and check that the vendors are
now listed AAAA,ZZZZ

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Martin Renvoize (ashimema) 2020-04-08 10:55:30 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 7 Joy Nelson 2020-05-01 18:59:04 UTC
backported to 19.11.x for 19.11.06
Comment 8 Lucas Gass (lukeg) 2020-05-11 21:45:42 UTC
backported to 19.05.x for 19.05.11