From 7f9ff906d9c2800fc5bf3d38db23a77e1f3745ab Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 11 Sep 2023 14:50:43 +0100 Subject: [PATCH] Bug 34223: (follow-up) Ensure consistent ordering of statuses This patch adds an order_by clause to ensure consistent ordering of the returned status and status_alias statuses from the database between MySQL 8 and other DB engines. This fixes the failing tests introducd in bug 34223. Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- Koha/Illbackend.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/Illbackend.pm b/Koha/Illbackend.pm index df29e970a5..ab31d05495 100644 --- a/Koha/Illbackend.pm +++ b/Koha/Illbackend.pm @@ -61,6 +61,7 @@ sub existing_statuses { select => [ 'status', \'MAX(illrequest_id)', 'backend' ], as => [qw/ status illrequest_id backend /], group_by => [qw/status backend/], + order_by => [qw/status backend/], } ); while ( my $request = $ill_requests->next ) { @@ -83,6 +84,7 @@ sub existing_statuses { select => [ 'status_alias', \'MAX(illrequest_id)', 'backend' ], as => [qw/ status_alias illrequest_id backend /], group_by => [qw/status_alias backend/], + order_by => [qw/status_alias backend/], } ); while ( my $request = $ill_requests->next ) { -- 2.39.5