From 5fdd325350de089c23c98e1c4a5a45963458906b Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Wed, 1 Apr 2026 08:42:02 +0200 Subject: [PATCH] Fix(SQL): Fix Field 'MIN(level)' unknown --- CHANGELOG.md | 7 +++++++ inc/category.class.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9da3583..a763d6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [UNRELEASED] + +### + +- Fix SQL query `Field 'MIN(level)' unknown` + + ## [2.6.1] - 2025-11-13 ### Fixed diff --git a/inc/category.class.php b/inc/category.class.php index 5cf670c..552976b 100644 --- a/inc/category.class.php +++ b/inc/category.class.php @@ -302,7 +302,7 @@ public static function filterActors(array $params = []): array // Selects the level min that will be displayed if ($level == 0) { $criteria = [ - 'SELECT' => 'MIN(level) as level', + 'SELECT' => ['MIN' => 'level'], 'FROM' => $table, 'WHERE' => [ 'itilcategories_id' => $itilcategories_id,