diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 46c8460ef91772294f05cb0a96562e702c4a5e8f..ce41baeac3a7ee93efb8052d261a0898e48d82f8 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -328,6 +328,14 @@ 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 ($p->get('name')) + $matches['field.'.$f->get('id').'.'.mb_strtolower($p->get('name'))] + = 'Ticket / '.$f->getLabel().' / '.$p->getLabel(); + } + } } return $matches; }, 30); @@ -919,6 +927,12 @@ class DynamicList extends VerySimpleModel { return $this->_form; } + function getProperties() { + if ($f = $this->getForm()) + return $f->getFields(); + return array(); + } + function getForm() { return $this->getConfigurationForm(); }