diff --git a/CHANGELOG.md b/CHANGELOG.md index f501ee43..0902b9f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASE] +### Fixed + +- Fix of GLPI native fields update for objects with `fields` containers. + ## [1.21.20] - 2025-03-20 ### Fixed diff --git a/inc/container.class.php b/inc/container.class.php index 1dc8c3f5..93c9de2c 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1716,9 +1716,7 @@ public static function preItem(CommonDBTM $item) $entities = getSonsOf(getTableForItemType('Entity'), $loc_c->fields['entities_id']); } - //workaround: when a ticket is created from readdonly profile, - //it is not initialized; see https://github.com/glpi-project/glpi/issues/1438 - if (!empty($item->fields)) { + if (count($item->fields) === 0) { $item->fields = $item->input; }