Skip to content

Commit ab1043e

Browse files
authored
fix: Unable to populate additional fields because the itemtype is missing from db request (#1083)
1 parent 4de1506 commit ab1043e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- Fixed a bug that prevented the creation of additional field data for objects
13+
814
## [1.23.0] - 2025-11-05
915

1016
### Added

inc/abstractcontainerinstance.class.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ abstract class PluginFieldsAbstractContainerInstance extends CommonDBChild
3333
public static $itemtype = 'itemtype';
3434
public static $items_id = 'items_id';
3535

36-
public static $mustBeAttached = false;
37-
3836
/**
3937
* This function relies on the static property `static::$plugins_forward_entity`,
4038
* which should be populated using the following method (from setup):

inc/container.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,7 @@ public static function postItemAdd(CommonDBTM $item)
17451745
{
17461746
if (array_key_exists('_plugin_fields_data', $item->input)) {
17471747
$data = $item->input['_plugin_fields_data'];
1748+
$data['itemtype'] = $item::class;
17481749
$data['items_id'] = $item->getID();
17491750
$data['entities_id'] = $item->isEntityAssign() ? $item->getEntityID() : 0;
17501751
//update data

0 commit comments

Comments
 (0)