浏览代码

N.500 Changed the query to fetch tickets related to a CI, so as to make it unambiguous whatever customization is made to the datamodel.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4498 a333f486-631f-4898-b8df-5754b55c2be0
romainq 8 年之前
父节点
当前提交
3a8ad1075e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml

+ 2 - 1
datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml

@@ -1582,7 +1582,8 @@
 					$sStateAttCode = MetaModel::GetStateAttributeCode($sSubClass);
 					if ($sStateAttCode != '')
 					{
-						$oSearch = DBSearch::FromOQL("SELECT $sSubClass AS t JOIN $sLnkClass AS lnk ON lnk.$sExtKeyToRemote = t.id WHERE $sExtKeyToMe = :myself AND $sStateAttCode NOT IN ('rejected', 'resolved', 'closed')", array('myself' => $this->GetKey()));
+					    // Todo: base the search condition on operational_status = 'ongoing' for a more flexible behavior
+						$oSearch = DBSearch::FromOQL("SELECT $sSubClass AS t JOIN $sLnkClass AS lnk ON lnk.$sExtKeyToRemote = t.id WHERE lnk.$sExtKeyToMe = :myself AND t.$sStateAttCode NOT IN ('rejected', 'resolved', 'closed')", array('myself' => $this->GetKey()));
 						$aSearches[$sSubClass] = $oSearch;
 
 						$oSet = new DBObjectSet($oSearch);