diff --git a/.upgradenotes/MDL-83718-2025030316100672.yml b/.upgradenotes/MDL-83718-2025030316100672.yml new file mode 100644 index 00000000000..74d5c9ca5fb --- /dev/null +++ b/.upgradenotes/MDL-83718-2025030316100672.yml @@ -0,0 +1,8 @@ +issueNumber: MDL-83718 +notes: + core_reportbuilder: + - message: >- + For columns implementing custom sorting via their `set_is_sortable` + method, the specified sort fields must also be part of the columns + initially selected fields + type: changed diff --git a/reportbuilder/classes/local/report/column.php b/reportbuilder/classes/local/report/column.php index aa603e0707e..839ddb125fa 100644 --- a/reportbuilder/classes/local/report/column.php +++ b/reportbuilder/classes/local/report/column.php @@ -563,7 +563,7 @@ final class column { * Sets the column as sortable * * @param bool $issortable - * @param array $sortfields Define the fields that should be used when the column is sorted, typically a subset of the fields + * @param array $sortfields Define the fields that should be used when the column is sorted. Must be a subset of the fields * selected for the column, via {@see add_field}. If omitted then the first selected field is used * @return self */