mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°2746 - Fix search from shortcut
This commit is contained in:
@@ -1127,7 +1127,7 @@ class ScalarExpression extends UnaryExpression
|
||||
{
|
||||
$oValue = $oAttDef->GetExistingTagsFromString($oValue, true);
|
||||
}
|
||||
/** @var \ormTagSet $oValue */
|
||||
/** @var \ormTagSet $sValue */
|
||||
$aTags = $oValue->GetTags();
|
||||
foreach($aTags as $oTag)
|
||||
{
|
||||
@@ -1146,6 +1146,38 @@ class ScalarExpression extends UnaryExpression
|
||||
IssueLog::Error($e->getMessage());
|
||||
}
|
||||
break;
|
||||
case ($oAttDef instanceof AttributeEnumSet):
|
||||
try
|
||||
{
|
||||
if (!empty($this->GetValue()))
|
||||
{
|
||||
$aValues = array();
|
||||
$sValue = $this->GetValue();
|
||||
if (is_string($sValue))
|
||||
{
|
||||
$aTags = $oAttDef->FromStringToArray($sValue, ' ');
|
||||
}
|
||||
else
|
||||
{
|
||||
$aTags = array();
|
||||
}
|
||||
foreach($aTags as $sLabel => $sValue)
|
||||
{
|
||||
$aValue['label'] = $sLabel;
|
||||
$aValue['value'] = $sValue;
|
||||
$aValues[] = $aValue;
|
||||
}
|
||||
$aCriterion['values'] = $aValues;
|
||||
}
|
||||
else
|
||||
{
|
||||
$aCriterion['has_undefined'] = true;
|
||||
}
|
||||
} catch (Exception $e)
|
||||
{
|
||||
IssueLog::Error($e->getMessage());
|
||||
}
|
||||
break;
|
||||
case $oAttDef->IsExternalKey():
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user