Skip to content
Snippets Groups Projects
Commit 2113df06 authored by Jared Hancock's avatar Jared Hancock
Browse files

Add filterable list item props for users and orgs

parent 6016d0ae
Branches
Tags
No related merge requests found
...@@ -244,6 +244,12 @@ Filter::addSupportedMatches('User Data', function() { ...@@ -244,6 +244,12 @@ Filter::addSupportedMatches('User Data', function() {
if (!$f->hasData()) if (!$f->hasData())
continue; continue;
$matches['field.'.$f->get('id')] = 'User / '.$f->getLabel(); $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; return $matches;
}, 20); }, 20);
...@@ -328,9 +334,8 @@ Filter::addSupportedMatches('Ticket Data', function() { ...@@ -328,9 +334,8 @@ Filter::addSupportedMatches('Ticket Data', function() {
if (!$f->hasData()) if (!$f->hasData())
continue; continue;
$matches['field.'.$f->get('id')] = 'Ticket / '.$f->getLabel(); $matches['field.'.$f->get('id')] = 'Ticket / '.$f->getLabel();
if (strpos($f->get('type'), 'list-') === 0) { if (($fi = $f->getImpl()) instanceof SelectionField) {
list(,$id) = explode('-', $f->get('type')); foreach ($fi->getList()->getProperties() as $p) {
foreach (DynamicList::lookup($id)->getProperties() as $p) {
$matches['field.'.$f->get('id').'.'.$p->get('id')] $matches['field.'.$f->get('id').'.'.$p->get('id')]
= 'Ticket / '.$f->getLabel().' / '.$p->getLabel(); = 'Ticket / '.$f->getLabel().' / '.$p->getLabel();
} }
......
...@@ -426,6 +426,12 @@ Filter::addSupportedMatches('Organization Data', function() { ...@@ -426,6 +426,12 @@ Filter::addSupportedMatches('Organization Data', function() {
if (!$f->hasData()) if (!$f->hasData())
continue; continue;
$matches['field.'.$f->get('id')] = 'Organization / '.$f->getLabel(); $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; return $matches;
},40); },40);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment