From 4822bb7a7c69c1cab325afe25ebae7bf5ba13ef0 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 17 Feb 2021 15:00:15 +0000 Subject: [PATCH] Bug 26274: (QA follow-up) Fix the order of summary groups The grouped income/outgoing summaries were not being explicitly ordered and it appears the default ordering for MySQL 8 is different to that of MariaDB and previous versions of MySQL and as such was causing test failures for that version. This patch adds an explicit sort on the 'description' for each debit_type and credit_type grouping. --- Koha/Cash/Register/Cashup.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/Cash/Register/Cashup.pm b/Koha/Cash/Register/Cashup.pm index a7e071afae..d3047036a4 100644 --- a/Koha/Cash/Register/Cashup.pm +++ b/Koha/Cash/Register/Cashup.pm @@ -110,6 +110,7 @@ sub summary { 'debit_type_code.description' ], 'as' => [ 'total', 'debit_type_code', 'debit_description' ], + order_by => { '-asc' => 'debit_type_code.description' }, } ); @@ -130,6 +131,7 @@ sub summary { 'credit_type_code.description' ], 'as' => [ 'total', 'credit_type_code', 'credit_description' ], + order_by => { '-asc' => 'credit_type_code.description' }, } ); -- 2.20.1