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
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
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>
Thanks Devinim! :-)
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
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>
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.06
backported to 19.05.x for 19.05.11