From 321e04d630324c44929c931acfcce344b06e4a98 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 3 Dec 2024 07:27:22 +0000 Subject: [PATCH] MDL-83718 tag: consistently sort "flagged" report entity column. It contains only a calculated boolean field, and should be sorted as such. --- tag/classes/reportbuilder/local/entities/tag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag/classes/reportbuilder/local/entities/tag.php b/tag/classes/reportbuilder/local/entities/tag.php index ed1ef5d31b0..4212c79b23a 100644 --- a/tag/classes/reportbuilder/local/entities/tag.php +++ b/tag/classes/reportbuilder/local/entities/tag.php @@ -175,7 +175,7 @@ class tag extends base { ->add_joins($this->get_joins()) ->set_type(column::TYPE_BOOLEAN) ->add_field("CASE WHEN {$tagalias}.flag > 0 THEN 1 ELSE {$tagalias}.flag END", 'flag') - ->set_is_sortable(true, ["{$tagalias}.flag"]) + ->set_is_sortable(true) ->add_callback([format::class, 'boolean_as_text']); // Flag count.