From 42aaadd45ab4febdee18c183636f41a42b2ae789 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 27 May 2022 09:38:16 +0200 Subject: [PATCH] fix(targetticket): assign group actor from object --- inc/abstracttarget.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/abstracttarget.class.php b/inc/abstracttarget.class.php index d0a889fef..19ae52297 100644 --- a/inc/abstracttarget.class.php +++ b/inc/abstracttarget.class.php @@ -696,7 +696,11 @@ protected function prepareActors(PluginFormcreatorForm $form, PluginFormcreatorF if ($question->isNewItem()) { continue 2; } - $itemtype = DropdownField::getSubItemtypeForValues($question->fields['values']); + $field = $question->getSubField(); + if (!method_exists($field, 'getSubItemtype')) { + continue 2; + } + $itemtype = $field->getSubItemtype(); if (!is_subclass_of($itemtype, CommonDBTM::class)) { continue 2; }