diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 68557e4d8ac6428ae1088f974d499d1413f49c12..45419c7ecb78f129a3f291def2b398a237854d5a 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -244,6 +244,12 @@ Filter::addSupportedMatches('User Data', function() { if (!$f->hasData()) continue; $matches['field.'.$f->get('id')] = 'User / '.$f->getLabel(); + if (($fi = $f->getImpl()) instanceof SelectionField) { + foreach ($fi->getList()->getProperties() as $p) { + $matches['field.'.$f->get('id').'.'.$p->get('id')] + = 'User / '.$f->getLabel().' / '.$p->getLabel(); + } + } } return $matches; }, 20); @@ -328,9 +334,8 @@ Filter::addSupportedMatches('Ticket Data', function() { if (!$f->hasData()) continue; $matches['field.'.$f->get('id')] = 'Ticket / '.$f->getLabel(); - if (strpos($f->get('type'), 'list-') === 0) { - list(,$id) = explode('-', $f->get('type')); - foreach (DynamicList::lookup($id)->getProperties() as $p) { + if (($fi = $f->getImpl()) instanceof SelectionField) { + foreach ($fi->getList()->getProperties() as $p) { $matches['field.'.$f->get('id').'.'.$p->get('id')] = 'Ticket / '.$f->getLabel().' / '.$p->getLabel(); } diff --git a/include/class.organization.php b/include/class.organization.php index 9c420e66c59e50de601579ca53dc5f44d23279f1..d95088d509dd1cb1fbe8b8c8beb645b830565be5 100644 --- a/include/class.organization.php +++ b/include/class.organization.php @@ -426,6 +426,12 @@ Filter::addSupportedMatches('Organization Data', function() { if (!$f->hasData()) continue; $matches['field.'.$f->get('id')] = 'Organization / '.$f->getLabel(); + if (($fi = $f->getImpl()) instanceof SelectionField) { + foreach ($fi->getList()->getProperties() as $p) { + $matches['field.'.$f->get('id').'.'.$p->get('id')] + = 'Organization / '.$f->getLabel().' / '.$p->getLabel(); + } + } } return $matches; },40);