diff --git a/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml b/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml index 2a5efc46e..a718cba16 100755 --- a/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml +++ b/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml @@ -1404,9 +1404,6 @@ 70 - - 80 - 90 @@ -1462,6 +1459,60 @@ Overload-DBObject + + false + public + Overload-cmdbAbstractObject + GetLinkedClass(); + $sExtKeyToMe = $oAttDef->GetExtKeyToMe(); + $sExtKeyToRemote = $oAttDef->GetExtKeyToRemote(); + + $iTotal = 0; + $aSearches = array(); + + foreach (MetaModel::EnumChildClasses('Ticket') as $sSubClass) + { + if (!MetaModel::HasChildrenClasses($sSubClass)) + { + $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())); + $aSearches[$sSubClass] = $oSearch; + + $oSet = new DBObjectSet($oSearch); + $iTotal += $oSet->Count(); + } + } + } + + $sCount = ($iTotal > 0) ? ' ('.$iTotal.')' : ''; + $oPage->SetCurrentTab(Dict::S('Class:FunctionalCI/Tab:OpenedTickets').$sCount); + + foreach ($aSearches as $sSubClass => $oSearch) + { + $sBlockId = __class__.'_opened_'.$sSubClass; + + $oPage->add('
'); + $oPage->add(''.MetaModel::GetName($sSubClass).''); + $oBlock = new DisplayBlock($oSearch, 'list', false); + $oBlock->Display($oPage, $sBlockId, array('menu' => false)); + $oPage->add('
'); + } + } + }]]>
+
@@ -1627,9 +1678,6 @@ 150 - - 160 - @@ -2216,9 +2264,6 @@ 20 - - 30 - 35 @@ -2532,9 +2577,6 @@ 30 - - 40 - 45 @@ -2849,9 +2891,6 @@ 80 - - 90 - 100 @@ -2989,9 +3028,6 @@ 80 - - 90 - 100 @@ -3291,9 +3327,6 @@ 120 - - 130 - 140 @@ -3438,9 +3471,6 @@ 120 - - 130 - 140 @@ -3585,9 +3615,6 @@ 120 - - 130 - 140 @@ -3725,9 +3752,6 @@ 120 - - 130 - 140 @@ -3841,9 +3865,6 @@ 120 - - 130 - 140 @@ -3954,9 +3975,6 @@ 80 - - 90 - 100 @@ -4074,9 +4092,6 @@ 80 - - 90 - 100 @@ -4203,9 +4218,6 @@ 90 - - 100 - 110 diff --git a/datamodels/2.x/itop-config-mgmt/en.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/en.dict.itop-config-mgmt.php index 142d91fed..4a4b35b85 100755 --- a/datamodels/2.x/itop-config-mgmt/en.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/en.dict.itop-config-mgmt.php @@ -329,6 +329,7 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:FunctionalCI/Attribute:tickets_list+' => 'All the tickets for this configuration item', 'Class:FunctionalCI/Attribute:finalclass' => 'CI Type', 'Class:FunctionalCI/Attribute:finalclass+' => '', + 'Class:FunctionalCI/Tab:OpenedTickets' => 'Active Tickets', )); // diff --git a/datamodels/2.x/itop-config-mgmt/fr.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/fr.dict.itop-config-mgmt.php index a7f3e75ee..58c9726d6 100755 --- a/datamodels/2.x/itop-config-mgmt/fr.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/fr.dict.itop-config-mgmt.php @@ -274,6 +274,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'Class:FunctionalCI/Attribute:tickets_list+' => '', 'Class:FunctionalCI/Attribute:finalclass' => 'Type de CI', 'Class:FunctionalCI/Attribute:finalclass+' => '', + 'Class:FunctionalCI/Tab:OpenedTickets' => 'Tickets en cours', )); // diff --git a/datamodels/2.x/itop-datacenter-mgmt/datamodel.itop-datacenter-mgmt.xml b/datamodels/2.x/itop-datacenter-mgmt/datamodel.itop-datacenter-mgmt.xml index 740f9d146..b14febcc9 100755 --- a/datamodels/2.x/itop-datacenter-mgmt/datamodel.itop-datacenter-mgmt.xml +++ b/datamodels/2.x/itop-datacenter-mgmt/datamodel.itop-datacenter-mgmt.xml @@ -96,9 +96,6 @@ 160 - - 170 - 180 @@ -297,9 +294,6 @@ 170 - - 180 - 190 @@ -649,9 +643,6 @@ 160 - - 170 - 180 @@ -838,9 +829,6 @@ 170 - - 180 - 190 diff --git a/datamodels/2.x/itop-endusers-devices/datamodel.itop-enduser-devices.xml b/datamodels/2.x/itop-endusers-devices/datamodel.itop-enduser-devices.xml index 5c2c44c4f..39b6120f3 100644 --- a/datamodels/2.x/itop-endusers-devices/datamodel.itop-enduser-devices.xml +++ b/datamodels/2.x/itop-endusers-devices/datamodel.itop-enduser-devices.xml @@ -230,9 +230,6 @@ 160 - - 170 - 180 @@ -402,9 +399,6 @@ 180 - - 190 - 200 @@ -563,9 +557,6 @@ 160 - - 170 - 180 @@ -712,9 +703,6 @@ 140 - - 150 - 160 @@ -876,9 +864,6 @@ 20 - - 30 - 40 @@ -1082,9 +1067,6 @@ 20 - - 30 - 40 @@ -1309,9 +1291,6 @@ 150 - - 160 - 170 diff --git a/datamodels/2.x/itop-storage-mgmt/datamodel.itop-storage-mgmt.xml b/datamodels/2.x/itop-storage-mgmt/datamodel.itop-storage-mgmt.xml index 988eaa9c5..6b767e642 100644 --- a/datamodels/2.x/itop-storage-mgmt/datamodel.itop-storage-mgmt.xml +++ b/datamodels/2.x/itop-storage-mgmt/datamodel.itop-storage-mgmt.xml @@ -43,9 +43,6 @@ 20 - - 30 - 35 @@ -307,9 +304,6 @@ 20 - - 30 - 35 @@ -570,9 +564,6 @@ 30 - - 45 - 35 @@ -827,9 +818,6 @@ 20 - - 30 - 35 diff --git a/datamodels/2.x/itop-virtualization-mgmt/datamodel.itop-virtualization-mgmt.xml b/datamodels/2.x/itop-virtualization-mgmt/datamodel.itop-virtualization-mgmt.xml index ad1a02b88..f91585c2a 100644 --- a/datamodels/2.x/itop-virtualization-mgmt/datamodel.itop-virtualization-mgmt.xml +++ b/datamodels/2.x/itop-virtualization-mgmt/datamodel.itop-virtualization-mgmt.xml @@ -332,9 +332,6 @@ 90 - - 100 - 110 @@ -481,9 +478,6 @@ 70 - - 80 - 90 @@ -658,9 +652,6 @@ 30 - - 40 - 45