Prechádzať zdrojové kódy

Itop design: added an intermediate root node above 'classes'

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1936 a333f486-631f-4898-b8df-5754b55c2be0
romainq 13 rokov pred
rodič
commit
22344829e4

+ 59 - 57
datamodel/itop-attachments/datamodel.itop-attachments.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<classes>
-  <class name="Attachment" category="addon,bizmodel" parent="DBObject" abstract="false" key_type="autoincrement" db_table="attachment" db_key_field="id" db_final_class_field="">
-    <properties>
-      <comment><![CDATA[/**
+<itop_design>
+  <classes>
+    <class name="Attachment" category="addon,bizmodel" parent="DBObject" abstract="false" key_type="autoincrement" db_table="attachment" db_key_field="id" db_final_class_field="">
+      <properties>
+        <comment><![CDATA[/**
  * Module attachments
  * 
  * A quick and easy way to upload and attach files to *any* (see Configuration below) object in the CMBD in one click
@@ -15,30 +16,30 @@
  * @author      Denis Flaven <denis.flaven@combodo.com>
  * @license     http://www.opensource.org/licenses/gpl-3.0.html LGPL
  */]]></comment>
-      <naming format="%1$s %2$s">
-        <attributes>
-          <attribute name="item_class"/>
-          <attribute name="temp_id"/>
-        </attributes>
-      </naming>
-      <display_template></display_template>
-      <icon></icon>
-      <reconciliation>
-        <attributes>
-          <attribute name=""/>
-        </attributes>
-      </reconciliation>
-    </properties>
-    <fields>
-      <field name="expire" type="DateTime" sql="expire" default_value="" is_null_allowed="false"/>
-      <field name="temp_id" type="String" sql="temp_id" default_value="" is_null_allowed="true"/>
-      <field name="item_class" type="String" sql="item_class" default_value="" is_null_allowed="false"/>
-      <field name="item_id" type="String" sql="item_id" default_value="" is_null_allowed="true"/>
-      <field name="item_org_id" type="Integer" sql="item_org_id" default_value="0" is_null_allowed="true"/>
-      <field name="contents" type="Blob"/>
-    </fields>
-    <methods>
-      <method name="MapContextParam" static="true" access="public" type="Overload-ExNihilo"><comment><![CDATA[/**
+        <naming format="%1$s %2$s">
+          <attributes>
+            <attribute name="item_class"/>
+            <attribute name="temp_id"/>
+          </attributes>
+        </naming>
+        <display_template></display_template>
+        <icon></icon>
+        <reconciliation>
+          <attributes>
+            <attribute name=""/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field name="expire" type="DateTime" sql="expire" default_value="" is_null_allowed="false"/>
+        <field name="temp_id" type="String" sql="temp_id" default_value="" is_null_allowed="true"/>
+        <field name="item_class" type="String" sql="item_class" default_value="" is_null_allowed="false"/>
+        <field name="item_id" type="String" sql="item_id" default_value="" is_null_allowed="true"/>
+        <field name="item_org_id" type="Integer" sql="item_org_id" default_value="0" is_null_allowed="true"/>
+        <field name="contents" type="Blob"/>
+      </fields>
+      <methods>
+        <method name="MapContextParam" static="true" access="public" type="Overload-ExNihilo"><comment><![CDATA[/**
 	 * Maps the given context parameter name to the appropriate filter/search code for this class
 	 * @param string $sContextParam Name of the context parameter, e.g. 'org_id'
 	 * @return string Filter code, e.g. 'customer_id'
@@ -53,7 +54,7 @@
 			return null;
 		}
 	}]]></method>
-      <method name="SetItem" static="false" access="public" type="Overload-ExNihilo"><comment><![CDATA[/**
+        <method name="SetItem" static="false" access="public" type="Overload-ExNihilo"><comment><![CDATA[/**
 	 * Set/Update all of the '_item' fields
 	 * @param object $oItem Container item
 	 * @return void
@@ -86,7 +87,7 @@
 			}
 		}
 	}]]></method>
-      <method name="SetDefaultOrgId" static="false" access="public" type="Overload-ExNihilo"><comment><![CDATA[/**
+        <method name="SetDefaultOrgId" static="false" access="public" type="Overload-ExNihilo"><comment><![CDATA[/**
 	 * Give a default value for item_org_id (if relevant...)
 	 * @return void
 	 */]]></comment><![CDATA[	public function SetDefaultOrgId()
@@ -123,30 +124,31 @@
 			}
 		}
 	}]]></method>
-    </methods>
-    <presentation>
-      <details>
-        <items>
-          <item>temp_id</item>
-          <item>item_class</item>
-          <item>item_id</item>
-          <item>item_org_id</item>
-        </items>
-      </details>
-      <search>
-        <items>
-          <item>temp_id</item>
-          <item>item_class</item>
-          <item>item_id</item>
-        </items>
-      </search>
-      <list>
-        <items>
-          <item>temp_id</item>
-          <item>item_class</item>
-          <item>item_id</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-</classes>
+      </methods>
+      <presentation>
+        <details>
+          <items>
+            <item>temp_id</item>
+            <item>item_class</item>
+            <item>item_id</item>
+            <item>item_org_id</item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item>temp_id</item>
+            <item>item_class</item>
+            <item>item_id</item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item>temp_id</item>
+            <item>item_class</item>
+            <item>item_id</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+  </classes>
+</itop_design>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 499 - 498
datamodel/itop-change-mgmt-1.0.0/datamodel.itop-change-mgmt.xml


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 603 - 602
datamodel/itop-config-mgmt-1.0.0/datamodel.itop-config-mgmt.xml


+ 575 - 573
datamodel/itop-incident-mgmt-1.0.0/datamodel.itop-incident-mgmt.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<classes>
-  <class name="Incident" category="bizmodel,searchable,incidentmgmt" parent="ResponseTicket" abstract="false" key_type="autoincrement" db_table="ticket_incident" db_key_field="id" db_final_class_field="">
-    <properties>
-      <comment><![CDATA[/**
+<itop_design>
+  <classes>
+    <class name="Incident" category="bizmodel,searchable,incidentmgmt" parent="ResponseTicket" abstract="false" key_type="autoincrement" db_table="ticket_incident" db_key_field="id" db_final_class_field="">
+      <properties>
+        <comment><![CDATA[/**
  * Persistent classes for a CMDB
  *
  * @author      Erwan Taloc <erwan.taloc@combodo.com>
@@ -10,421 +11,421 @@
  * @author      Denis Flaven <denis.flaven@combodo.com>
  * @license     http://www.opensource.org/licenses/gpl-3.0.html LGPL
  */]]></comment>
-      <naming format="%1$s">
-        <attributes>
-          <attribute name="ref"/>
-        </attributes>
-      </naming>
-      <display_template></display_template>
-      <icon>images/incident.png</icon>
-      <reconciliation>
-        <attributes>
-          <attribute name="ref"/>
-        </attributes>
-      </reconciliation>
-      <order>
-        <columns>
-          <column name="ref" ascending="false"/>
-        </columns>
-      </order>
-    </properties>
-    <fields/>
-    <lifecycle attribute="status">
-      <stimuli>
-        <stimulus name="ev_assign" type="StimulusUserAction"/>
-        <stimulus name="ev_reassign" type="StimulusUserAction"/>
-        <stimulus name="ev_timeout" type="StimulusInternal"/>
-        <stimulus name="ev_resolve" type="StimulusUserAction"/>
-        <stimulus name="ev_close" type="StimulusUserAction"/>
-      </stimuli>
-      <states>
-        <state name="new">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title"/>
-            <attribute name="description" must_change="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" mandatory="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" must_change="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" must_change="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" must_change="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" must_prompt="1"/>
-            <attribute name="impact" must_change="1"/>
-            <attribute name="urgency" must_change="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" must_change="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" hidden="1"/>
-            <attribute name="related_problem_id" hidden="1"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id" hidden="1"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" read_only="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_assign" target="assigned">
-              <actions>
-                <action verb="SetAssignedDate"/>
-              </actions>
-            </transition>
-            <transition stimulus="ev_timeout" target="escalated_tto">
-              <actions/>
-            </transition>
-          </transitions>
-        </state>
-        <state name="escalated_tto">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title"/>
-            <attribute name="description"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" mandatory="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" hidden="1"/>
-            <attribute name="related_problem_id" hidden="1"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id" hidden="1"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" read_only="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_assign" target="assigned">
-              <actions>
-                <action verb="SetAssignedDate"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="assigned">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" mandatory="1" must_prompt="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" read_only="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="assigned">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_timeout" target="escalated_ttr">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_resolve" target="resolved">
-              <actions>
-                <action verb="SetResolveDate"/>
-                <action verb="SetClosureDeadline"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="escalated_ttr">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" mandatory="1" must_prompt="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" read_only="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="escalated_ttr">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_resolve" target="resolved">
-              <actions>
-                <action verb="SetResolveDate"/>
-                <action verb="SetClosureDeadline"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="frozen">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" mandatory="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" mandatory="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" read_only="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions/>
-        </state>
-        <state name="resolved">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" read_only="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" read_only="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" read_only="1"/>
-            <attribute name="impact" read_only="1"/>
-            <attribute name="urgency" read_only="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" read_only="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" read_only="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" read_only="1"/>
-            <attribute name="resolution_code" must_prompt="1"/>
-            <attribute name="solution" must_prompt="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="assigned">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_close" target="closed">
-              <actions>
-                <action verb="SetClosureDate"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="closed">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log" read_only="1"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" read_only="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" read_only="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" read_only="1"/>
-            <attribute name="impact" read_only="1"/>
-            <attribute name="urgency" read_only="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" read_only="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" read_only="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" read_only="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" read_only="1"/>
-            <attribute name="solution" read_only="1"/>
-            <attribute name="user_satisfaction" must_prompt="1"/>
-            <attribute name="user_commment" must_prompt="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions/>
-        </state>
-      </states>
-    </lifecycle>
-    <methods>
-      <method name="ComputeValues" static="false" access="public" type="Overload-DBObject"><![CDATA[	public function ComputeValues()
+        <naming format="%1$s">
+          <attributes>
+            <attribute name="ref"/>
+          </attributes>
+        </naming>
+        <display_template></display_template>
+        <icon>images/incident.png</icon>
+        <reconciliation>
+          <attributes>
+            <attribute name="ref"/>
+          </attributes>
+        </reconciliation>
+        <order>
+          <columns>
+            <column name="ref" ascending="false"/>
+          </columns>
+        </order>
+      </properties>
+      <fields/>
+      <lifecycle attribute="status">
+        <stimuli>
+          <stimulus name="ev_assign" type="StimulusUserAction"/>
+          <stimulus name="ev_reassign" type="StimulusUserAction"/>
+          <stimulus name="ev_timeout" type="StimulusInternal"/>
+          <stimulus name="ev_resolve" type="StimulusUserAction"/>
+          <stimulus name="ev_close" type="StimulusUserAction"/>
+        </stimuli>
+        <states>
+          <state name="new">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title"/>
+              <attribute name="description" must_change="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" mandatory="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" must_change="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" must_change="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" must_change="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" must_prompt="1"/>
+              <attribute name="impact" must_change="1"/>
+              <attribute name="urgency" must_change="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" must_change="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" hidden="1"/>
+              <attribute name="related_problem_id" hidden="1"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id" hidden="1"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" read_only="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_assign" target="assigned">
+                <actions>
+                  <action verb="SetAssignedDate"/>
+                </actions>
+              </transition>
+              <transition stimulus="ev_timeout" target="escalated_tto">
+                <actions/>
+              </transition>
+            </transitions>
+          </state>
+          <state name="escalated_tto">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title"/>
+              <attribute name="description"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" mandatory="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" hidden="1"/>
+              <attribute name="related_problem_id" hidden="1"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id" hidden="1"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" read_only="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_assign" target="assigned">
+                <actions>
+                  <action verb="SetAssignedDate"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="assigned">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" mandatory="1" must_prompt="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" read_only="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="assigned">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_timeout" target="escalated_ttr">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_resolve" target="resolved">
+                <actions>
+                  <action verb="SetResolveDate"/>
+                  <action verb="SetClosureDeadline"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="escalated_ttr">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" mandatory="1" must_prompt="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" read_only="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="escalated_ttr">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_resolve" target="resolved">
+                <actions>
+                  <action verb="SetResolveDate"/>
+                  <action verb="SetClosureDeadline"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="frozen">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" mandatory="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" mandatory="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" read_only="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions/>
+          </state>
+          <state name="resolved">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" read_only="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" read_only="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" read_only="1"/>
+              <attribute name="impact" read_only="1"/>
+              <attribute name="urgency" read_only="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" read_only="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" read_only="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" read_only="1"/>
+              <attribute name="resolution_code" must_prompt="1"/>
+              <attribute name="solution" must_prompt="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="assigned">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_close" target="closed">
+                <actions>
+                  <action verb="SetClosureDate"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="closed">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log" read_only="1"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" read_only="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" read_only="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" read_only="1"/>
+              <attribute name="impact" read_only="1"/>
+              <attribute name="urgency" read_only="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" read_only="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" read_only="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" read_only="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" read_only="1"/>
+              <attribute name="solution" read_only="1"/>
+              <attribute name="user_satisfaction" must_prompt="1"/>
+              <attribute name="user_commment" must_prompt="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions/>
+          </state>
+        </states>
+      </lifecycle>
+      <methods>
+        <method name="ComputeValues" static="false" access="public" type="Overload-DBObject"><![CDATA[	public function ComputeValues()
 	{
 		$sCurrRef = $this->Get('ref');
 		if (strlen($sCurrRef) == 0)
@@ -441,7 +442,7 @@
 
 		return parent::ComputeValues();
 	}]]></method>
-      <method name="OnInsert" static="false" access="protected" type="Overload-DBObject"><![CDATA[	protected function OnInsert()
+        <method name="OnInsert" static="false" access="protected" type="Overload-DBObject"><![CDATA[	protected function OnInsert()
 	{
 		$oToNotify = $this->Get('contact_list');
 		$oToImpact = $this->Get('ci_list');
@@ -472,7 +473,7 @@
 		}
 		parent::OnInsert();
 	}]]></method>
-      <method name="GetIcon" static="false" access="public" type="Overload-DBObject"><comment><![CDATA[/**
+        <method name="GetIcon" static="false" access="public" type="Overload-DBObject"><comment><![CDATA[/**
 	 * Get the icon representing this object
 	 * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)
 	 * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file
@@ -538,7 +539,7 @@
 		}
 		return $sIcon;
 	}]]></method>
-      <method name="MakeIconFromName" static="true" access="protected" type="Overload-DBObject"><![CDATA[	protected static function MakeIconFromName($sIconName, $bImgTag = true)
+        <method name="MakeIconFromName" static="true" access="protected" type="Overload-DBObject"><![CDATA[	protected static function MakeIconFromName($sIconName, $bImgTag = true)
 	{
 		$sIcon = '';
 		if ($sIconName != '')
@@ -555,154 +556,155 @@
 		}
 		return $sIcon;
 	}]]></method>
-    </methods>
-    <presentation>
-      <details>
-        <items>
-          <item>document_list</item>
-          <item>ci_list</item>
-          <item>contact_list</item>
-          <item>incident_list</item>
-          <item key="col:col1">
-            <items>
-              <item key="fieldset:Ticket:baseinfo">
-                <items>
-                  <item>ref</item>
-                  <item>title</item>
-                  <item>org_id</item>
-                  <item>status</item>
-                  <item>priority</item>
-                  <item>service_id</item>
-                  <item>servicesubcategory_id</item>
-                  <item>product</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:moreinfo">
-                <items>
-                  <item>impact</item>
-                  <item>urgency</item>
-                  <item>description</item>
-                  <item>resolution_code</item>
-                  <item>solution</item>
-                  <item>user_satisfaction</item>
-                  <item>user_commment</item>
-                </items>
-              </item>
-            </items>
-          </item>
-          <item key="col:col2">
-            <items>
-              <item key="fieldset:Ticket:date">
-                <items>
-                  <item>start_date</item>
-                  <item>last_update</item>
-                  <item>assignment_date</item>
-                  <item>tto_escalation_deadline</item>
-                  <item>ttr_escalation_deadline</item>
-                  <item>close_date</item>
-                  <item>closure_deadline</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:contact">
-                <items>
-                  <item>caller_id</item>
-                  <item>workgroup_id</item>
-                  <item>agent_id</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:relation">
-                <items>
-                  <item>related_problem_id</item>
-                  <item>related_change_id</item>
-                </items>
-              </item>
-            </items>
-          </item>
-        </items>
-      </details>
-      <search>
-        <items>
-          <item>ref</item>
-          <item>title</item>
-          <item>org_id</item>
-          <item>start_date</item>
-          <item>status</item>
-          <item>caller_id</item>
-          <item>service_id</item>
-          <item>servicesubcategory_id</item>
-          <item>product</item>
-          <item>impact</item>
-          <item>urgency</item>
-          <item>priority</item>
-          <item>workgroup_id</item>
-          <item>agent_id</item>
-          <item>agent_email</item>
-          <item>close_date</item>
-          <item>resolution_code</item>
-          <item>solution</item>
-          <item>user_satisfaction</item>
-          <item>user_commment</item>
-        </items>
-      </search>
-      <list>
-        <items>
-          <item>title</item>
-          <item>org_id</item>
-          <item>start_date</item>
-          <item>status</item>
-          <item>service_id</item>
-          <item>priority</item>
-          <item>workgroup_id</item>
-          <item>agent_id</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-  <class name="lnkTicketToIncident" category="bizmodel,searchable,incidentmgmt,requestmgmt,lnkincident" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" is_link="1" db_table="lnktickettoincident" db_key_field="id" db_final_class_field="">
-    <properties>
-      <naming format="%1$s">
-        <attributes>
-          <attribute name="ticket_id"/>
-        </attributes>
-      </naming>
-      <display_template></display_template>
-      <icon></icon>
-      <reconciliation>
-        <attributes>
-          <attribute name="ticket_id"/>
-          <attribute name="incident_id"/>
-        </attributes>
-      </reconciliation>
-    </properties>
-    <fields>
-      <field name="ticket_id" type="ExternalKey" target_class="Ticket" jointype="" sql="ticket_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
-      <field name="ticket_ref" type="ExternalField" extkey_attcode="ticket_id" target_attcode="ref"/>
-      <field name="incident_id" type="ExternalKey" target_class="Incident" jointype="" sql="incident_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
-      <field name="incident_ref" type="ExternalField" extkey_attcode="incident_id" target_attcode="ref"/>
-      <field name="reason" type="String" sql="reason" default_value="" is_null_allowed="true"/>
-    </fields>
-    <methods/>
-    <presentation>
-      <details>
-        <items>
-          <item>ticket_id</item>
-          <item>incident_id</item>
-          <item>reason</item>
-        </items>
-      </details>
-      <search>
-        <items>
-          <item>ticket_id</item>
-          <item>incident_id</item>
-        </items>
-      </search>
-      <list>
-        <items>
-          <item>ticket_id</item>
-          <item>incident_id</item>
-          <item>reason</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-</classes>
+      </methods>
+      <presentation>
+        <details>
+          <items>
+            <item>document_list</item>
+            <item>ci_list</item>
+            <item>contact_list</item>
+            <item>incident_list</item>
+            <item key="col:col1">
+              <items>
+                <item key="fieldset:Ticket:baseinfo">
+                  <items>
+                    <item>ref</item>
+                    <item>title</item>
+                    <item>org_id</item>
+                    <item>status</item>
+                    <item>priority</item>
+                    <item>service_id</item>
+                    <item>servicesubcategory_id</item>
+                    <item>product</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:moreinfo">
+                  <items>
+                    <item>impact</item>
+                    <item>urgency</item>
+                    <item>description</item>
+                    <item>resolution_code</item>
+                    <item>solution</item>
+                    <item>user_satisfaction</item>
+                    <item>user_commment</item>
+                  </items>
+                </item>
+              </items>
+            </item>
+            <item key="col:col2">
+              <items>
+                <item key="fieldset:Ticket:date">
+                  <items>
+                    <item>start_date</item>
+                    <item>last_update</item>
+                    <item>assignment_date</item>
+                    <item>tto_escalation_deadline</item>
+                    <item>ttr_escalation_deadline</item>
+                    <item>close_date</item>
+                    <item>closure_deadline</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:contact">
+                  <items>
+                    <item>caller_id</item>
+                    <item>workgroup_id</item>
+                    <item>agent_id</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:relation">
+                  <items>
+                    <item>related_problem_id</item>
+                    <item>related_change_id</item>
+                  </items>
+                </item>
+              </items>
+            </item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item>ref</item>
+            <item>title</item>
+            <item>org_id</item>
+            <item>start_date</item>
+            <item>status</item>
+            <item>caller_id</item>
+            <item>service_id</item>
+            <item>servicesubcategory_id</item>
+            <item>product</item>
+            <item>impact</item>
+            <item>urgency</item>
+            <item>priority</item>
+            <item>workgroup_id</item>
+            <item>agent_id</item>
+            <item>agent_email</item>
+            <item>close_date</item>
+            <item>resolution_code</item>
+            <item>solution</item>
+            <item>user_satisfaction</item>
+            <item>user_commment</item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item>title</item>
+            <item>org_id</item>
+            <item>start_date</item>
+            <item>status</item>
+            <item>service_id</item>
+            <item>priority</item>
+            <item>workgroup_id</item>
+            <item>agent_id</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+    <class name="lnkTicketToIncident" category="bizmodel,searchable,incidentmgmt,requestmgmt,lnkincident" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" is_link="1" db_table="lnktickettoincident" db_key_field="id" db_final_class_field="">
+      <properties>
+        <naming format="%1$s">
+          <attributes>
+            <attribute name="ticket_id"/>
+          </attributes>
+        </naming>
+        <display_template></display_template>
+        <icon></icon>
+        <reconciliation>
+          <attributes>
+            <attribute name="ticket_id"/>
+            <attribute name="incident_id"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field name="ticket_id" type="ExternalKey" target_class="Ticket" jointype="" sql="ticket_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
+        <field name="ticket_ref" type="ExternalField" extkey_attcode="ticket_id" target_attcode="ref"/>
+        <field name="incident_id" type="ExternalKey" target_class="Incident" jointype="" sql="incident_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
+        <field name="incident_ref" type="ExternalField" extkey_attcode="incident_id" target_attcode="ref"/>
+        <field name="reason" type="String" sql="reason" default_value="" is_null_allowed="true"/>
+      </fields>
+      <methods/>
+      <presentation>
+        <details>
+          <items>
+            <item>ticket_id</item>
+            <item>incident_id</item>
+            <item>reason</item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item>ticket_id</item>
+            <item>incident_id</item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item>ticket_id</item>
+            <item>incident_id</item>
+            <item>reason</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+  </classes>
+</itop_design>

+ 176 - 174
datamodel/itop-knownerror-mgmt-1.0.0/datamodel.itop-knownerror-mgmt.xml

@@ -1,181 +1,183 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<classes>
-  <class name="KnownError" category="bizmodel,searchable,knownerrormgmt" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" db_table="known_error" db_key_field="id" db_final_class_field="">
-    <properties>
-      <comment><![CDATA[/**
+<itop_design>
+  <classes>
+    <class name="KnownError" category="bizmodel,searchable,knownerrormgmt" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" db_table="known_error" db_key_field="id" db_final_class_field="">
+      <properties>
+        <comment><![CDATA[/**
 * Description of known error
 */]]></comment>
-      <naming format="%1$s">
-        <attributes>
-          <attribute name="name"/>
-        </attributes>
-      </naming>
-      <display_template></display_template>
-      <icon>images/known-error.png</icon>
-      <reconciliation>
-        <attributes>
-          <attribute name="org_id"/>
-          <attribute name="name"/>
-        </attributes>
-      </reconciliation>
-    </properties>
-    <fields>
-      <field name="name" type="String" sql="name" default_value="" is_null_allowed="false"/>
-      <field name="org_id" type="ExternalKey" target_class="Organization" jointype="" sql="cust_id" is_null_allowed="false" on_target_delete="DEL_MANUAL"/>
-      <field name="cust_name" type="ExternalField" extkey_attcode="org_id" target_attcode="name"/>
-      <field name="problem_id" type="ExternalKey" target_class="Problem" jointype="" sql="problem_id" is_null_allowed="true" on_target_delete="DEL_MANUAL"/>
-      <field name="problem_ref" type="ExternalField" extkey_attcode="problem_id" target_attcode="ref"/>
-      <field name="symptom" type="Text" sql="symptom" default_value="" is_null_allowed="false"/>
-      <field name="root_cause" type="Text" sql="rootcause" default_value="" is_null_allowed="true"/>
-      <field name="workaround" type="Text" sql="workaround" default_value="" is_null_allowed="true"/>
-      <field name="solution" type="Text" sql="solution" default_value="" is_null_allowed="true"/>
-      <field name="error_code" type="String" sql="error_code" default_value="" is_null_allowed="true"/>
-      <field name="domain" type="Enum" sql="domain" default_value="Application" is_null_allowed="false">
-        <values>
-          <value>Network</value>
-          <value>Server</value>
-          <value>Application</value>
-          <value>Desktop</value>
-        </values>
-      </field>
-      <field name="vendor" type="String" sql="vendor" default_value="" is_null_allowed="true"/>
-      <field name="model" type="String" sql="model" default_value="" is_null_allowed="true"/>
-      <field name="version" type="String" sql="version" default_value="" is_null_allowed="true"/>
-      <field name="ci_list" type="LinkedSetIndirect" linked_class="lnkInfraError" ext_key_to_me="error_id" ext_key_to_remote="infra_id" count_min="0" count_max="0"/>
-      <field name="document_list" type="LinkedSetIndirect" linked_class="lnkDocumentError" ext_key_to_me="error_id" ext_key_to_remote="doc_id" count_min="0" count_max="0"/>
-    </fields>
-    <methods/>
-    <presentation>
-      <details>
-        <items>
-          <item>name</item>
-          <item>org_id</item>
-          <item>problem_id</item>
-          <item>error_code</item>
-          <item>domain</item>
-          <item>vendor</item>
-          <item>model</item>
-          <item>version</item>
-          <item>symptom</item>
-          <item>root_cause</item>
-          <item>workaround</item>
-          <item>solution</item>
-          <item>ci_list</item>
-          <item>document_list</item>
-        </items>
-      </details>
-      <search>
-        <items>
-          <item>name</item>
-          <item>org_id</item>
-          <item>problem_id</item>
-          <item>error_code</item>
-          <item>domain</item>
-          <item>symptom</item>
-        </items>
-      </search>
-      <list>
-        <items>
-          <item>org_id</item>
-          <item>problem_id</item>
-          <item>error_code</item>
-          <item>symptom</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-  <class name="lnkInfraError" category="bizmodel,searchable,knownerrormgmt,lnkknownerror" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" is_link="1" db_table="infra_error_links" db_key_field="link_id" db_final_class_field="">
-    <properties>
-      <comment><![CDATA[/**
+        <naming format="%1$s">
+          <attributes>
+            <attribute name="name"/>
+          </attributes>
+        </naming>
+        <display_template></display_template>
+        <icon>images/known-error.png</icon>
+        <reconciliation>
+          <attributes>
+            <attribute name="org_id"/>
+            <attribute name="name"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field name="name" type="String" sql="name" default_value="" is_null_allowed="false"/>
+        <field name="org_id" type="ExternalKey" target_class="Organization" jointype="" sql="cust_id" is_null_allowed="false" on_target_delete="DEL_MANUAL"/>
+        <field name="cust_name" type="ExternalField" extkey_attcode="org_id" target_attcode="name"/>
+        <field name="problem_id" type="ExternalKey" target_class="Problem" jointype="" sql="problem_id" is_null_allowed="true" on_target_delete="DEL_MANUAL"/>
+        <field name="problem_ref" type="ExternalField" extkey_attcode="problem_id" target_attcode="ref"/>
+        <field name="symptom" type="Text" sql="symptom" default_value="" is_null_allowed="false"/>
+        <field name="root_cause" type="Text" sql="rootcause" default_value="" is_null_allowed="true"/>
+        <field name="workaround" type="Text" sql="workaround" default_value="" is_null_allowed="true"/>
+        <field name="solution" type="Text" sql="solution" default_value="" is_null_allowed="true"/>
+        <field name="error_code" type="String" sql="error_code" default_value="" is_null_allowed="true"/>
+        <field name="domain" type="Enum" sql="domain" default_value="Application" is_null_allowed="false">
+          <values>
+            <value>Network</value>
+            <value>Server</value>
+            <value>Application</value>
+            <value>Desktop</value>
+          </values>
+        </field>
+        <field name="vendor" type="String" sql="vendor" default_value="" is_null_allowed="true"/>
+        <field name="model" type="String" sql="model" default_value="" is_null_allowed="true"/>
+        <field name="version" type="String" sql="version" default_value="" is_null_allowed="true"/>
+        <field name="ci_list" type="LinkedSetIndirect" linked_class="lnkInfraError" ext_key_to_me="error_id" ext_key_to_remote="infra_id" count_min="0" count_max="0"/>
+        <field name="document_list" type="LinkedSetIndirect" linked_class="lnkDocumentError" ext_key_to_me="error_id" ext_key_to_remote="doc_id" count_min="0" count_max="0"/>
+      </fields>
+      <methods/>
+      <presentation>
+        <details>
+          <items>
+            <item>name</item>
+            <item>org_id</item>
+            <item>problem_id</item>
+            <item>error_code</item>
+            <item>domain</item>
+            <item>vendor</item>
+            <item>model</item>
+            <item>version</item>
+            <item>symptom</item>
+            <item>root_cause</item>
+            <item>workaround</item>
+            <item>solution</item>
+            <item>ci_list</item>
+            <item>document_list</item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item>name</item>
+            <item>org_id</item>
+            <item>problem_id</item>
+            <item>error_code</item>
+            <item>domain</item>
+            <item>symptom</item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item>org_id</item>
+            <item>problem_id</item>
+            <item>error_code</item>
+            <item>symptom</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+    <class name="lnkInfraError" category="bizmodel,searchable,knownerrormgmt,lnkknownerror" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" is_link="1" db_table="infra_error_links" db_key_field="link_id" db_final_class_field="">
+      <properties>
+        <comment><![CDATA[/**
 * n-n link between any Infra and a Known Error
 */]]></comment>
-      <naming format="lnkInfraError">
-        <attributes/>
-      </naming>
-      <display_template></display_template>
-      <icon></icon>
-      <reconciliation>
-        <attributes>
-          <attribute name="infra_id"/>
-          <attribute name="error_id"/>
-        </attributes>
-      </reconciliation>
-    </properties>
-    <fields>
-      <field name="infra_id" type="ExternalKey" target_class="FunctionalCI" jointype="" sql="infra_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
-      <field name="infra_name" type="ExternalField" extkey_attcode="infra_id" target_attcode="name"/>
-      <field name="infra_status" type="ExternalField" extkey_attcode="infra_id" target_attcode="status"/>
-      <field name="error_id" type="ExternalKey" target_class="KnownError" jointype="" sql="error_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
-      <field name="error_name" type="ExternalField" extkey_attcode="error_id" target_attcode="name"/>
-      <field name="reason" type="String" sql="dummy" default_value="" is_null_allowed="true"/>
-    </fields>
-    <methods/>
-    <presentation>
-      <details>
-        <items>
-          <item>infra_id</item>
-          <item>error_id</item>
-          <item>reason</item>
-        </items>
-      </details>
-      <search>
-        <items>
-          <item>infra_id</item>
-          <item>error_id</item>
-        </items>
-      </search>
-      <list>
-        <items>
-          <item>infra_id</item>
-          <item>infra_status</item>
-          <item>error_id</item>
-          <item>reason</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-  <class name="lnkDocumentError" category="bizmodel,searchable,knownerrormgmt,lnkknownerror" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" is_link="1" db_table="documents_error_link" db_key_field="link_id" db_final_class_field="">
-    <properties>
-      <comment><![CDATA[/**
+        <naming format="lnkInfraError">
+          <attributes/>
+        </naming>
+        <display_template></display_template>
+        <icon></icon>
+        <reconciliation>
+          <attributes>
+            <attribute name="infra_id"/>
+            <attribute name="error_id"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field name="infra_id" type="ExternalKey" target_class="FunctionalCI" jointype="" sql="infra_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
+        <field name="infra_name" type="ExternalField" extkey_attcode="infra_id" target_attcode="name"/>
+        <field name="infra_status" type="ExternalField" extkey_attcode="infra_id" target_attcode="status"/>
+        <field name="error_id" type="ExternalKey" target_class="KnownError" jointype="" sql="error_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
+        <field name="error_name" type="ExternalField" extkey_attcode="error_id" target_attcode="name"/>
+        <field name="reason" type="String" sql="dummy" default_value="" is_null_allowed="true"/>
+      </fields>
+      <methods/>
+      <presentation>
+        <details>
+          <items>
+            <item>infra_id</item>
+            <item>error_id</item>
+            <item>reason</item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item>infra_id</item>
+            <item>error_id</item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item>infra_id</item>
+            <item>infra_status</item>
+            <item>error_id</item>
+            <item>reason</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+    <class name="lnkDocumentError" category="bizmodel,searchable,knownerrormgmt,lnkknownerror" parent="cmdbAbstractObject" abstract="false" key_type="autoincrement" is_link="1" db_table="documents_error_link" db_key_field="link_id" db_final_class_field="">
+      <properties>
+        <comment><![CDATA[/**
 * n-n link between any Contract and a Document
 */]]></comment>
-      <naming format="%1$s">
-        <attributes>
-          <attribute name="link_type"/>
-        </attributes>
-      </naming>
-      <display_template>../business/templates/default.html</display_template>
-      <icon></icon>
-      <reconciliation>
-        <attributes>
-          <attribute name="doc_id"/>
-          <attribute name="error_id"/>
-        </attributes>
-      </reconciliation>
-    </properties>
-    <fields>
-      <field name="doc_id" type="ExternalKey" target_class="Document" jointype="" sql="doc_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
-      <field name="doc_name" type="ExternalField" extkey_attcode="doc_id" target_attcode="name"/>
-      <field name="error_id" type="ExternalKey" target_class="KnownError" jointype="" sql="error_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
-      <field name="error_name" type="ExternalField" extkey_attcode="error_id" target_attcode="name"/>
-      <field name="link_type" type="String" sql="link_type" default_value="" is_null_allowed="true"/>
-    </fields>
-    <methods/>
-    <presentation>
-      <details>
-        <items>
-          <item>doc_id</item>
-          <item>error_name</item>
-          <item>link_type</item>
-        </items>
-      </details>
-      <list>
-        <items>
-          <item>doc_id</item>
-          <item>error_name</item>
-          <item>link_type</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-</classes>
+        <naming format="%1$s">
+          <attributes>
+            <attribute name="link_type"/>
+          </attributes>
+        </naming>
+        <display_template>../business/templates/default.html</display_template>
+        <icon></icon>
+        <reconciliation>
+          <attributes>
+            <attribute name="doc_id"/>
+            <attribute name="error_id"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field name="doc_id" type="ExternalKey" target_class="Document" jointype="" sql="doc_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
+        <field name="doc_name" type="ExternalField" extkey_attcode="doc_id" target_attcode="name"/>
+        <field name="error_id" type="ExternalKey" target_class="KnownError" jointype="" sql="error_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
+        <field name="error_name" type="ExternalField" extkey_attcode="error_id" target_attcode="name"/>
+        <field name="link_type" type="String" sql="link_type" default_value="" is_null_allowed="true"/>
+      </fields>
+      <methods/>
+      <presentation>
+        <details>
+          <items>
+            <item>doc_id</item>
+            <item>error_name</item>
+            <item>link_type</item>
+          </items>
+        </details>
+        <list>
+          <items>
+            <item>doc_id</item>
+            <item>error_name</item>
+            <item>link_type</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+  </classes>
+</itop_design>

+ 370 - 368
datamodel/itop-problem-mgmt-1.0.0/datamodel.itop-problem-mgmt.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<classes>
-  <class name="Problem" category="bizmodel,searchable,problemmgmt" parent="Ticket" abstract="false" key_type="autoincrement" db_table="ticket_problem" db_key_field="id" db_final_class_field="">
-    <properties>
-      <comment><![CDATA[/**
+<itop_design>
+  <classes>
+    <class name="Problem" category="bizmodel,searchable,problemmgmt" parent="Ticket" abstract="false" key_type="autoincrement" db_table="ticket_problem" db_key_field="id" db_final_class_field="">
+      <properties>
+        <comment><![CDATA[/**
  * Persistent classes for a CMDB
  *
  * @author      Erwan Taloc <erwan.taloc@combodo.com>
@@ -10,294 +11,294 @@
  * @author      Denis Flaven <denis.flaven@combodo.com>
  * @license     http://www.opensource.org/licenses/gpl-3.0.html LGPL
  */]]></comment>
-      <naming format="%1$s">
-        <attributes>
-          <attribute name="ref"/>
-        </attributes>
-      </naming>
-      <display_template></display_template>
-      <icon>images/problem.png</icon>
-      <reconciliation>
-        <attributes>
-          <attribute name="ref"/>
-        </attributes>
-      </reconciliation>
-      <order>
-        <columns>
-          <column name="ref" ascending="false"/>
-        </columns>
-      </order>
-    </properties>
-    <fields>
-      <field name="status" type="Enum" sql="status" default_value="new" is_null_allowed="false">
-        <values>
-          <value>new</value>
-          <value>assigned</value>
-          <value>resolved</value>
-          <value>closed</value>
-        </values>
-      </field>
-      <field name="org_id" type="ExternalKey" target_class="Organization" jointype="" sql="org_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
-      <field name="org_name" type="ExternalField" extkey_attcode="org_id" target_attcode="name"/>
-      <field name="service_id" type="ExternalKey" target_class="Service" jointype="" filter="SELECT Service AS s JOIN SLA AS sla ON sla.service_id=s.id JOIN lnkContractToSLA AS ln ON ln.sla_id=sla.id JOIN CustomerContract AS cc ON ln.contract_id=cc.id WHERE cc.org_id =:this-&gt;org_id" sql="service_id" is_null_allowed="false" on_target_delete="DEL_MANUAL">
-        <dependencies>
-          <attribute name="org_id"/>
-        </dependencies>
-      </field>
-      <field name="service_name" type="ExternalField" extkey_attcode="service_id" target_attcode="name"/>
-      <field name="servicesubcategory_id" type="ExternalKey" target_class="ServiceSubcategory" jointype="" filter="SELECT ServiceSubcategory WHERE service_id = :this-&gt;service_id" sql="servicesubcategory_id" is_null_allowed="false" on_target_delete="DEL_MANUAL">
-        <dependencies>
-          <attribute name="service_id"/>
-        </dependencies>
-      </field>
-      <field name="servicesubcategory_name" type="ExternalField" extkey_attcode="servicesubcategory_id" target_attcode="name"/>
-      <field name="product" type="String" sql="product" default_value="" is_null_allowed="true"/>
-      <field name="impact" type="Enum" sql="impact" default_value="1" is_null_allowed="false">
-        <values>
-          <value>1</value>
-          <value>2</value>
-          <value>3</value>
-        </values>
-      </field>
-      <field name="urgency" type="Enum" sql="urgency" default_value="1" is_null_allowed="false">
-        <values>
-          <value>1</value>
-          <value>2</value>
-          <value>3</value>
-        </values>
-      </field>
-      <field name="priority" type="Enum" sql="priority" default_value="1" is_null_allowed="false">
-        <values>
-          <value>1</value>
-          <value>2</value>
-          <value>3</value>
-        </values>
-      </field>
-      <field name="workgroup_id" type="ExternalKey" target_class="Team" jointype="" filter="SELECT Team AS t JOIN CustomerContract AS cc ON cc.support_team_id=t.id JOIN lnkContractToSLA AS ln ON ln.contract_id=cc.id JOIN SLA AS sla ON ln.sla_id=sla.id WHERE sla.service_id = :this-&gt;service_id AND cc.org_id = :this-&gt;org_id" sql="workgroup_id" is_null_allowed="false" on_target_delete="DEL_MANUAL">
-        <dependencies>
-          <attribute name="org_id"/>
-          <attribute name="service_id"/>
-        </dependencies>
-      </field>
-      <field name="workgroup_name" type="ExternalField" extkey_attcode="workgroup_id" target_attcode="name"/>
-      <field name="agent_id" type="ExternalKey" target_class="Person" jointype="" filter="SELECT Person AS p JOIN lnkTeamToContact AS l ON l.contact_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this-&gt;workgroup_id" sql="agent_id" is_null_allowed="true" on_target_delete="DEL_MANUAL">
-        <dependencies>
-          <attribute name="workgroup_id"/>
-        </dependencies>
-      </field>
-      <field name="agent_name" type="ExternalField" extkey_attcode="agent_id" target_attcode="name"/>
-      <field name="agent_email" type="ExternalField" extkey_attcode="agent_id" target_attcode="email"/>
-      <field name="related_change_id" type="ExternalKey" target_class="Change" jointype="" sql="related_change_id" is_null_allowed="true" on_target_delete="DEL_MANUAL"/>
-      <field name="related_change_ref" type="ExternalField" extkey_attcode="related_change_id" target_attcode="ref"/>
-      <field name="close_date" type="DateTime" sql="close_date" default_value="" is_null_allowed="true"/>
-      <field name="last_update" type="DateTime" sql="last_update" default_value="" is_null_allowed="true"/>
-      <field name="assignment_date" type="DateTime" sql="assignment_date" default_value="" is_null_allowed="true"/>
-      <field name="resolution_date" type="DateTime" sql="resolution_date" default_value="" is_null_allowed="true"/>
-      <field name="knownerrors_list" type="LinkedSet" linked_class="KnownError" ext_key_to_me="problem_id" count_min="0" count_max="0"/>
-    </fields>
-    <lifecycle attribute="status">
-      <stimuli>
-        <stimulus name="ev_assign" type="StimulusUserAction"/>
-        <stimulus name="ev_reassign" type="StimulusUserAction"/>
-        <stimulus name="ev_resolve" type="StimulusUserAction"/>
-        <stimulus name="ev_close" type="StimulusUserAction"/>
-      </stimuli>
-      <states>
-        <state name="new">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title"/>
-            <attribute name="description" must_change="1"/>
-            <attribute name="ticket_log" hidden="1"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="org_id" must_change="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" must_change="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" must_change="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" must_prompt="1"/>
-            <attribute name="impact" must_change="1"/>
-            <attribute name="urgency" must_change="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" must_change="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" hidden="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" hidden="1"/>
-            <attribute name="related_change_id" hidden="1"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="knownerrors_list"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_assign" target="assigned">
-              <actions>
-                <action verb="SetAssignedDate"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="assigned">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
+        <naming format="%1$s">
+          <attributes>
+            <attribute name="ref"/>
+          </attributes>
+        </naming>
+        <display_template></display_template>
+        <icon>images/problem.png</icon>
+        <reconciliation>
+          <attributes>
+            <attribute name="ref"/>
+          </attributes>
+        </reconciliation>
+        <order>
+          <columns>
+            <column name="ref" ascending="false"/>
+          </columns>
+        </order>
+      </properties>
+      <fields>
+        <field name="status" type="Enum" sql="status" default_value="new" is_null_allowed="false">
+          <values>
+            <value>new</value>
+            <value>assigned</value>
+            <value>resolved</value>
+            <value>closed</value>
+          </values>
+        </field>
+        <field name="org_id" type="ExternalKey" target_class="Organization" jointype="" sql="org_id" is_null_allowed="false" on_target_delete="DEL_AUTO"/>
+        <field name="org_name" type="ExternalField" extkey_attcode="org_id" target_attcode="name"/>
+        <field name="service_id" type="ExternalKey" target_class="Service" jointype="" filter="SELECT Service AS s JOIN SLA AS sla ON sla.service_id=s.id JOIN lnkContractToSLA AS ln ON ln.sla_id=sla.id JOIN CustomerContract AS cc ON ln.contract_id=cc.id WHERE cc.org_id =:this-&gt;org_id" sql="service_id" is_null_allowed="false" on_target_delete="DEL_MANUAL">
+          <dependencies>
+            <attribute name="org_id"/>
+          </dependencies>
+        </field>
+        <field name="service_name" type="ExternalField" extkey_attcode="service_id" target_attcode="name"/>
+        <field name="servicesubcategory_id" type="ExternalKey" target_class="ServiceSubcategory" jointype="" filter="SELECT ServiceSubcategory WHERE service_id = :this-&gt;service_id" sql="servicesubcategory_id" is_null_allowed="false" on_target_delete="DEL_MANUAL">
+          <dependencies>
             <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" mandatory="1" must_prompt="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" read_only="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="knownerrors_list"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="assigned">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_resolve" target="resolved">
-              <actions>
-                <action verb="SetResolveDate"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="resolved">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" read_only="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" read_only="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" read_only="1"/>
-            <attribute name="impact" read_only="1"/>
-            <attribute name="urgency" read_only="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" read_only="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" read_only="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" read_only="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="knownerrors_list"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="assigned">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_close" target="closed">
-              <actions>
-                <action verb="SetClosureDate"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="closed">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log" read_only="1"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" read_only="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" read_only="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" read_only="1"/>
-            <attribute name="impact" read_only="1"/>
-            <attribute name="urgency" read_only="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" read_only="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" read_only="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" read_only="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" read_only="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="knownerrors_list"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions/>
-        </state>
-      </states>
-    </lifecycle>
-    <methods>
-      <method name="SetAssignedDate" static="false" access="public" type="LifecycleAction"><![CDATA[        public function SetAssignedDate($sStimulusCode)
+          </dependencies>
+        </field>
+        <field name="servicesubcategory_name" type="ExternalField" extkey_attcode="servicesubcategory_id" target_attcode="name"/>
+        <field name="product" type="String" sql="product" default_value="" is_null_allowed="true"/>
+        <field name="impact" type="Enum" sql="impact" default_value="1" is_null_allowed="false">
+          <values>
+            <value>1</value>
+            <value>2</value>
+            <value>3</value>
+          </values>
+        </field>
+        <field name="urgency" type="Enum" sql="urgency" default_value="1" is_null_allowed="false">
+          <values>
+            <value>1</value>
+            <value>2</value>
+            <value>3</value>
+          </values>
+        </field>
+        <field name="priority" type="Enum" sql="priority" default_value="1" is_null_allowed="false">
+          <values>
+            <value>1</value>
+            <value>2</value>
+            <value>3</value>
+          </values>
+        </field>
+        <field name="workgroup_id" type="ExternalKey" target_class="Team" jointype="" filter="SELECT Team AS t JOIN CustomerContract AS cc ON cc.support_team_id=t.id JOIN lnkContractToSLA AS ln ON ln.contract_id=cc.id JOIN SLA AS sla ON ln.sla_id=sla.id WHERE sla.service_id = :this-&gt;service_id AND cc.org_id = :this-&gt;org_id" sql="workgroup_id" is_null_allowed="false" on_target_delete="DEL_MANUAL">
+          <dependencies>
+            <attribute name="org_id"/>
+            <attribute name="service_id"/>
+          </dependencies>
+        </field>
+        <field name="workgroup_name" type="ExternalField" extkey_attcode="workgroup_id" target_attcode="name"/>
+        <field name="agent_id" type="ExternalKey" target_class="Person" jointype="" filter="SELECT Person AS p JOIN lnkTeamToContact AS l ON l.contact_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this-&gt;workgroup_id" sql="agent_id" is_null_allowed="true" on_target_delete="DEL_MANUAL">
+          <dependencies>
+            <attribute name="workgroup_id"/>
+          </dependencies>
+        </field>
+        <field name="agent_name" type="ExternalField" extkey_attcode="agent_id" target_attcode="name"/>
+        <field name="agent_email" type="ExternalField" extkey_attcode="agent_id" target_attcode="email"/>
+        <field name="related_change_id" type="ExternalKey" target_class="Change" jointype="" sql="related_change_id" is_null_allowed="true" on_target_delete="DEL_MANUAL"/>
+        <field name="related_change_ref" type="ExternalField" extkey_attcode="related_change_id" target_attcode="ref"/>
+        <field name="close_date" type="DateTime" sql="close_date" default_value="" is_null_allowed="true"/>
+        <field name="last_update" type="DateTime" sql="last_update" default_value="" is_null_allowed="true"/>
+        <field name="assignment_date" type="DateTime" sql="assignment_date" default_value="" is_null_allowed="true"/>
+        <field name="resolution_date" type="DateTime" sql="resolution_date" default_value="" is_null_allowed="true"/>
+        <field name="knownerrors_list" type="LinkedSet" linked_class="KnownError" ext_key_to_me="problem_id" count_min="0" count_max="0"/>
+      </fields>
+      <lifecycle attribute="status">
+        <stimuli>
+          <stimulus name="ev_assign" type="StimulusUserAction"/>
+          <stimulus name="ev_reassign" type="StimulusUserAction"/>
+          <stimulus name="ev_resolve" type="StimulusUserAction"/>
+          <stimulus name="ev_close" type="StimulusUserAction"/>
+        </stimuli>
+        <states>
+          <state name="new">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title"/>
+              <attribute name="description" must_change="1"/>
+              <attribute name="ticket_log" hidden="1"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="org_id" must_change="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" must_change="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" must_change="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" must_prompt="1"/>
+              <attribute name="impact" must_change="1"/>
+              <attribute name="urgency" must_change="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" must_change="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" hidden="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" hidden="1"/>
+              <attribute name="related_change_id" hidden="1"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="knownerrors_list"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_assign" target="assigned">
+                <actions>
+                  <action verb="SetAssignedDate"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="assigned">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" mandatory="1" must_prompt="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" read_only="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="knownerrors_list"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="assigned">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_resolve" target="resolved">
+                <actions>
+                  <action verb="SetResolveDate"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="resolved">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" read_only="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" read_only="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" read_only="1"/>
+              <attribute name="impact" read_only="1"/>
+              <attribute name="urgency" read_only="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" read_only="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" read_only="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" read_only="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="knownerrors_list"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="assigned">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_close" target="closed">
+                <actions>
+                  <action verb="SetClosureDate"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="closed">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log" read_only="1"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" read_only="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" read_only="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" read_only="1"/>
+              <attribute name="impact" read_only="1"/>
+              <attribute name="urgency" read_only="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" read_only="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" read_only="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" read_only="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" read_only="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="knownerrors_list"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions/>
+          </state>
+        </states>
+      </lifecycle>
+      <methods>
+        <method name="SetAssignedDate" static="false" access="public" type="LifecycleAction"><![CDATA[        public function SetAssignedDate($sStimulusCode)
         {
                 $this->Set('assignment_date', time());
                 return true;
         }]]></method>
-      <method name="SetResolveDate" static="false" access="public" type="LifecycleAction"><![CDATA[        public function SetResolveDate($sStimulusCode)
+        <method name="SetResolveDate" static="false" access="public" type="LifecycleAction"><![CDATA[        public function SetResolveDate($sStimulusCode)
         {
                 $this->Set('resolution_date', time());
                 return true;
         }]]></method>
-      <method name="SetClosureDate" static="false" access="public" type="LifecycleAction"><![CDATA[        public function SetClosureDate($sStimulusCode)
+        <method name="SetClosureDate" static="false" access="public" type="LifecycleAction"><![CDATA[        public function SetClosureDate($sStimulusCode)
         {
                 $this->Set('close_date', time());
                 return true;
         }]]></method>
-      <method name="ComputePriority" static="false" access="public" type="LifecycleAction"><comment><![CDATA[/** Compute the priority of the ticket based on its impact and urgency
+        <method name="ComputePriority" static="false" access="public" type="LifecycleAction"><comment><![CDATA[/** Compute the priority of the ticket based on its impact and urgency
          * @return integer The priority of the ticket 1(high) .. 3(low)
          */]]></comment><![CDATA[        public function ComputePriority()
         {
@@ -325,7 +326,7 @@
                 $iPriority = $aPriorities[(int)$this->Get('impact')][(int)$this->Get('urgency')];
                 return $iPriority;              
         }]]></method>
-      <method name="ComputeValues" static="false" access="public" type="Overload-DBObject"><![CDATA[	public function ComputeValues()
+        <method name="ComputeValues" static="false" access="public" type="Overload-DBObject"><![CDATA[	public function ComputeValues()
 	{
 		// Compute the priority of the ticket
 		$this->Set('priority', $this->ComputePriority());
@@ -343,91 +344,92 @@
 			$this->Set('ref', $sName);
 		}
 	}]]></method>
-    </methods>
-    <presentation>
-      <details>
-        <items>
-          <item>document_list</item>
-          <item>ci_list</item>
-          <item>contact_list</item>
-          <item>incident_list</item>
-          <item key="col:col1">
-            <items>
-              <item key="fieldset:Ticket:baseinfo">
-                <items>
-                  <item>ref</item>
-                  <item>title</item>
-                  <item>org_id</item>
-                  <item>status</item>
-                  <item>priority</item>
-                  <item>service_id</item>
-                  <item>servicesubcategory_id</item>
-                  <item>product</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:moreinfo">
-                <items>
-                  <item>impact</item>
-                  <item>urgency</item>
-                  <item>description</item>
-                </items>
-              </item>
-            </items>
-          </item>
-          <item key="col:col2">
-            <items>
-              <item key="fieldset:Ticket:date">
-                <items>
-                  <item>start_date</item>
-                  <item>last_update</item>
-                  <item>assignment_date</item>
-                  <item>close_date</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:contact">
-                <items>
-                  <item>workgroup_id</item>
-                  <item>agent_id</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:relation">
-                <items>
-                  <item>related_change_id</item>
-                </items>
-              </item>
-            </items>
-          </item>
-        </items>
-      </details>
-      <search>
-        <items>
-          <item>ref</item>
-          <item>title</item>
-          <item>org_id</item>
-          <item>start_date</item>
-          <item>status</item>
-          <item>service_id</item>
-          <item>servicesubcategory_id</item>
-          <item>product</item>
-          <item>impact</item>
-          <item>urgency</item>
-          <item>priority</item>
-          <item>workgroup_id</item>
-          <item>agent_id</item>
-          <item>agent_email</item>
-          <item>close_date</item>
-        </items>
-      </search>
-      <list>
-        <items>
-          <item>title</item>
-          <item>org_id</item>
-          <item>start_date</item>
-          <item>status</item>
-          <item>service_id</item>
-          <item>priority</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-</classes>
+      </methods>
+      <presentation>
+        <details>
+          <items>
+            <item>document_list</item>
+            <item>ci_list</item>
+            <item>contact_list</item>
+            <item>incident_list</item>
+            <item key="col:col1">
+              <items>
+                <item key="fieldset:Ticket:baseinfo">
+                  <items>
+                    <item>ref</item>
+                    <item>title</item>
+                    <item>org_id</item>
+                    <item>status</item>
+                    <item>priority</item>
+                    <item>service_id</item>
+                    <item>servicesubcategory_id</item>
+                    <item>product</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:moreinfo">
+                  <items>
+                    <item>impact</item>
+                    <item>urgency</item>
+                    <item>description</item>
+                  </items>
+                </item>
+              </items>
+            </item>
+            <item key="col:col2">
+              <items>
+                <item key="fieldset:Ticket:date">
+                  <items>
+                    <item>start_date</item>
+                    <item>last_update</item>
+                    <item>assignment_date</item>
+                    <item>close_date</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:contact">
+                  <items>
+                    <item>workgroup_id</item>
+                    <item>agent_id</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:relation">
+                  <items>
+                    <item>related_change_id</item>
+                  </items>
+                </item>
+              </items>
+            </item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item>ref</item>
+            <item>title</item>
+            <item>org_id</item>
+            <item>start_date</item>
+            <item>status</item>
+            <item>service_id</item>
+            <item>servicesubcategory_id</item>
+            <item>product</item>
+            <item>impact</item>
+            <item>urgency</item>
+            <item>priority</item>
+            <item>workgroup_id</item>
+            <item>agent_id</item>
+            <item>agent_email</item>
+            <item>close_date</item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item>title</item>
+            <item>org_id</item>
+            <item>start_date</item>
+            <item>status</item>
+            <item>service_id</item>
+            <item>priority</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+  </classes>
+</itop_design>

+ 567 - 565
datamodel/itop-request-mgmt-1.0.0/datamodel.itop-request-mgmt.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<classes>
-  <class name="UserRequest" category="bizmodel,searchable,requestmgmt" parent="ResponseTicket" abstract="false" key_type="autoincrement" db_table="ticket_request" db_key_field="id" db_final_class_field="">
-    <properties>
-      <comment><![CDATA[/**
+<itop_design>
+  <classes>
+    <class name="UserRequest" category="bizmodel,searchable,requestmgmt" parent="ResponseTicket" abstract="false" key_type="autoincrement" db_table="ticket_request" db_key_field="id" db_final_class_field="">
+      <properties>
+        <comment><![CDATA[/**
  * Persistent classes for a CMDB
  *
  * @author      Erwan Taloc <erwan.taloc@combodo.com>
@@ -10,458 +11,458 @@
  * @author      Denis Flaven <denis.flaven@combodo.com>
  * @license     http://www.opensource.org/licenses/gpl-3.0.html LGPL
  */]]></comment>
-      <naming format="%1$s">
-        <attributes>
-          <attribute name="ref"/>
-        </attributes>
-      </naming>
-      <display_template></display_template>
-      <icon>images/user-request.png</icon>
-      <reconciliation>
-        <attributes>
-          <attribute name="ref"/>
-        </attributes>
-      </reconciliation>
-      <order>
-        <columns>
-          <column name="ref" ascending="false"/>
-        </columns>
-      </order>
-    </properties>
-    <fields>
-      <field name="request_type" type="Enum" sql="request_type" default_value="service request" is_null_allowed="false">
-        <values>
-          <value>service request</value>
-          <value>issue</value>
-          <value>information</value>
-        </values>
-      </field>
-      <field name="freeze_reason" type="String" sql="freeze_reason" default_value="" is_null_allowed="true"/>
-    </fields>
-    <lifecycle attribute="status">
-      <stimuli>
-        <stimulus name="ev_assign" type="StimulusUserAction"/>
-        <stimulus name="ev_reassign" type="StimulusUserAction"/>
-        <stimulus name="ev_timeout" type="StimulusInternal"/>
-        <stimulus name="ev_resolve" type="StimulusUserAction"/>
-        <stimulus name="ev_close" type="StimulusUserAction"/>
-        <stimulus name="ev_freeze" type="StimulusUserAction"/>
-      </stimuli>
-      <states>
-        <state name="new">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title"/>
-            <attribute name="description" must_change="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" mandatory="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" must_change="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" must_change="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" must_change="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" must_prompt="1"/>
-            <attribute name="impact" must_change="1"/>
-            <attribute name="urgency" must_change="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" must_change="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" hidden="1"/>
-            <attribute name="related_problem_id" hidden="1"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id" hidden="1"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" read_only="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="request_type" mandatory="1"/>
-            <attribute name="freeze_reason" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_assign" target="assigned">
-              <actions>
-                <action verb="SetAssignedDate"/>
-              </actions>
-            </transition>
-            <transition stimulus="ev_timeout" target="escalated_tto">
-              <actions/>
-            </transition>
-          </transitions>
-        </state>
-        <state name="escalated_tto">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title"/>
-            <attribute name="description"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" mandatory="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" hidden="1"/>
-            <attribute name="related_problem_id" hidden="1"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id" hidden="1"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" read_only="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="request_type" mandatory="1"/>
-            <attribute name="freeze_reason" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_assign" target="assigned">
-              <actions>
-                <action verb="SetAssignedDate"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="assigned">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" mandatory="1" must_prompt="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" read_only="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="request_type" mandatory="1"/>
-            <attribute name="freeze_reason" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="assigned">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_timeout" target="escalated_ttr">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_resolve" target="resolved">
-              <actions>
-                <action verb="SetResolveDate"/>
-                <action verb="SetClosureDeadline"/>
-              </actions>
-            </transition>
-            <transition stimulus="ev_freeze" target="frozen">
-              <actions/>
-            </transition>
-          </transitions>
-        </state>
-        <state name="escalated_ttr">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" mandatory="1" must_prompt="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" read_only="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="request_type" mandatory="1"/>
-            <attribute name="freeze_reason" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="escalated_ttr">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_resolve" target="resolved">
-              <actions>
-                <action verb="SetResolveDate"/>
-                <action verb="SetClosureDeadline"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="frozen">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product"/>
-            <attribute name="impact"/>
-            <attribute name="urgency"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" mandatory="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" mandatory="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" read_only="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" hidden="1"/>
-            <attribute name="solution" hidden="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="request_type" mandatory="1"/>
-            <attribute name="freeze_reason" mandatory="1" must_prompt="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_timeout" target="escalated_ttr">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_assign" target="assigned">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_resolve" target="resolved">
-              <actions/>
-            </transition>
-          </transitions>
-        </state>
-        <state name="resolved">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" read_only="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" read_only="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" read_only="1"/>
-            <attribute name="impact" read_only="1"/>
-            <attribute name="urgency" read_only="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" read_only="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" read_only="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" hidden="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" read_only="1"/>
-            <attribute name="resolution_code" must_prompt="1"/>
-            <attribute name="solution" must_prompt="1"/>
-            <attribute name="user_satisfaction" hidden="1"/>
-            <attribute name="user_commment" hidden="1"/>
-            <attribute name="request_type" mandatory="1"/>
-            <attribute name="freeze_reason" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions>
-            <transition stimulus="ev_reassign" target="assigned">
-              <actions/>
-            </transition>
-            <transition stimulus="ev_close" target="closed">
-              <actions>
-                <action verb="SetClosureDate"/>
-              </actions>
-            </transition>
-          </transitions>
-        </state>
-        <state name="closed">
-          <flags>
-            <attribute name="ref" read_only="1"/>
-            <attribute name="title" read_only="1"/>
-            <attribute name="description" read_only="1"/>
-            <attribute name="ticket_log" read_only="1"/>
-            <attribute name="start_date" read_only="1"/>
-            <attribute name="document_list"/>
-            <attribute name="ci_list"/>
-            <attribute name="contact_list"/>
-            <attribute name="incident_list"/>
-            <attribute name="status"/>
-            <attribute name="caller_id" read_only="1"/>
-            <attribute name="caller_email"/>
-            <attribute name="org_id" read_only="1"/>
-            <attribute name="org_name"/>
-            <attribute name="service_id" read_only="1"/>
-            <attribute name="service_name"/>
-            <attribute name="servicesubcategory_id" read_only="1"/>
-            <attribute name="servicesubcategory_name"/>
-            <attribute name="product" read_only="1"/>
-            <attribute name="impact" read_only="1"/>
-            <attribute name="urgency" read_only="1"/>
-            <attribute name="priority" read_only="1"/>
-            <attribute name="workgroup_id" read_only="1"/>
-            <attribute name="workgroup_name"/>
-            <attribute name="agent_id" read_only="1"/>
-            <attribute name="agent_name"/>
-            <attribute name="agent_email" read_only="1"/>
-            <attribute name="related_problem_id"/>
-            <attribute name="related_problem_ref"/>
-            <attribute name="related_change_id"/>
-            <attribute name="related_change_ref"/>
-            <attribute name="close_date" read_only="1"/>
-            <attribute name="last_update" read_only="1"/>
-            <attribute name="assignment_date" hidden="1"/>
-            <attribute name="resolution_date" hidden="1"/>
-            <attribute name="tto_escalation_deadline" hidden="1"/>
-            <attribute name="ttr_escalation_deadline" hidden="1"/>
-            <attribute name="closure_deadline" hidden="1"/>
-            <attribute name="resolution_code" read_only="1"/>
-            <attribute name="solution" read_only="1"/>
-            <attribute name="user_satisfaction" must_prompt="1"/>
-            <attribute name="user_commment" must_prompt="1"/>
-            <attribute name="request_type" read_only="1"/>
-            <attribute name="freeze_reason" hidden="1"/>
-            <attribute name="related_change_id_finalclass_recall"/>
-          </flags>
-          <transitions/>
-        </state>
-      </states>
-    </lifecycle>
-    <methods>
-      <method name="ComputeValues" static="false" access="public" type="Overload-DBObject"><![CDATA[	public function ComputeValues()
+        <naming format="%1$s">
+          <attributes>
+            <attribute name="ref"/>
+          </attributes>
+        </naming>
+        <display_template></display_template>
+        <icon>images/user-request.png</icon>
+        <reconciliation>
+          <attributes>
+            <attribute name="ref"/>
+          </attributes>
+        </reconciliation>
+        <order>
+          <columns>
+            <column name="ref" ascending="false"/>
+          </columns>
+        </order>
+      </properties>
+      <fields>
+        <field name="request_type" type="Enum" sql="request_type" default_value="service request" is_null_allowed="false">
+          <values>
+            <value>service request</value>
+            <value>issue</value>
+            <value>information</value>
+          </values>
+        </field>
+        <field name="freeze_reason" type="String" sql="freeze_reason" default_value="" is_null_allowed="true"/>
+      </fields>
+      <lifecycle attribute="status">
+        <stimuli>
+          <stimulus name="ev_assign" type="StimulusUserAction"/>
+          <stimulus name="ev_reassign" type="StimulusUserAction"/>
+          <stimulus name="ev_timeout" type="StimulusInternal"/>
+          <stimulus name="ev_resolve" type="StimulusUserAction"/>
+          <stimulus name="ev_close" type="StimulusUserAction"/>
+          <stimulus name="ev_freeze" type="StimulusUserAction"/>
+        </stimuli>
+        <states>
+          <state name="new">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title"/>
+              <attribute name="description" must_change="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" mandatory="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" must_change="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" must_change="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" must_change="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" must_prompt="1"/>
+              <attribute name="impact" must_change="1"/>
+              <attribute name="urgency" must_change="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" must_change="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" hidden="1"/>
+              <attribute name="related_problem_id" hidden="1"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id" hidden="1"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" read_only="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="request_type" mandatory="1"/>
+              <attribute name="freeze_reason" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_assign" target="assigned">
+                <actions>
+                  <action verb="SetAssignedDate"/>
+                </actions>
+              </transition>
+              <transition stimulus="ev_timeout" target="escalated_tto">
+                <actions/>
+              </transition>
+            </transitions>
+          </state>
+          <state name="escalated_tto">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title"/>
+              <attribute name="description"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" mandatory="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" hidden="1"/>
+              <attribute name="related_problem_id" hidden="1"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id" hidden="1"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" read_only="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="request_type" mandatory="1"/>
+              <attribute name="freeze_reason" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_assign" target="assigned">
+                <actions>
+                  <action verb="SetAssignedDate"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="assigned">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" mandatory="1" must_prompt="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" read_only="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="request_type" mandatory="1"/>
+              <attribute name="freeze_reason" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="assigned">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_timeout" target="escalated_ttr">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_resolve" target="resolved">
+                <actions>
+                  <action verb="SetResolveDate"/>
+                  <action verb="SetClosureDeadline"/>
+                </actions>
+              </transition>
+              <transition stimulus="ev_freeze" target="frozen">
+                <actions/>
+              </transition>
+            </transitions>
+          </state>
+          <state name="escalated_ttr">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" mandatory="1" must_prompt="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" mandatory="1" must_prompt="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" read_only="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="request_type" mandatory="1"/>
+              <attribute name="freeze_reason" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="escalated_ttr">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_resolve" target="resolved">
+                <actions>
+                  <action verb="SetResolveDate"/>
+                  <action verb="SetClosureDeadline"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="frozen">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product"/>
+              <attribute name="impact"/>
+              <attribute name="urgency"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" mandatory="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" mandatory="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" read_only="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" hidden="1"/>
+              <attribute name="solution" hidden="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="request_type" mandatory="1"/>
+              <attribute name="freeze_reason" mandatory="1" must_prompt="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_timeout" target="escalated_ttr">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_assign" target="assigned">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_resolve" target="resolved">
+                <actions/>
+              </transition>
+            </transitions>
+          </state>
+          <state name="resolved">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" read_only="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" read_only="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" read_only="1"/>
+              <attribute name="impact" read_only="1"/>
+              <attribute name="urgency" read_only="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" read_only="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" read_only="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" hidden="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" read_only="1"/>
+              <attribute name="resolution_code" must_prompt="1"/>
+              <attribute name="solution" must_prompt="1"/>
+              <attribute name="user_satisfaction" hidden="1"/>
+              <attribute name="user_commment" hidden="1"/>
+              <attribute name="request_type" mandatory="1"/>
+              <attribute name="freeze_reason" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions>
+              <transition stimulus="ev_reassign" target="assigned">
+                <actions/>
+              </transition>
+              <transition stimulus="ev_close" target="closed">
+                <actions>
+                  <action verb="SetClosureDate"/>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state name="closed">
+            <flags>
+              <attribute name="ref" read_only="1"/>
+              <attribute name="title" read_only="1"/>
+              <attribute name="description" read_only="1"/>
+              <attribute name="ticket_log" read_only="1"/>
+              <attribute name="start_date" read_only="1"/>
+              <attribute name="document_list"/>
+              <attribute name="ci_list"/>
+              <attribute name="contact_list"/>
+              <attribute name="incident_list"/>
+              <attribute name="status"/>
+              <attribute name="caller_id" read_only="1"/>
+              <attribute name="caller_email"/>
+              <attribute name="org_id" read_only="1"/>
+              <attribute name="org_name"/>
+              <attribute name="service_id" read_only="1"/>
+              <attribute name="service_name"/>
+              <attribute name="servicesubcategory_id" read_only="1"/>
+              <attribute name="servicesubcategory_name"/>
+              <attribute name="product" read_only="1"/>
+              <attribute name="impact" read_only="1"/>
+              <attribute name="urgency" read_only="1"/>
+              <attribute name="priority" read_only="1"/>
+              <attribute name="workgroup_id" read_only="1"/>
+              <attribute name="workgroup_name"/>
+              <attribute name="agent_id" read_only="1"/>
+              <attribute name="agent_name"/>
+              <attribute name="agent_email" read_only="1"/>
+              <attribute name="related_problem_id"/>
+              <attribute name="related_problem_ref"/>
+              <attribute name="related_change_id"/>
+              <attribute name="related_change_ref"/>
+              <attribute name="close_date" read_only="1"/>
+              <attribute name="last_update" read_only="1"/>
+              <attribute name="assignment_date" hidden="1"/>
+              <attribute name="resolution_date" hidden="1"/>
+              <attribute name="tto_escalation_deadline" hidden="1"/>
+              <attribute name="ttr_escalation_deadline" hidden="1"/>
+              <attribute name="closure_deadline" hidden="1"/>
+              <attribute name="resolution_code" read_only="1"/>
+              <attribute name="solution" read_only="1"/>
+              <attribute name="user_satisfaction" must_prompt="1"/>
+              <attribute name="user_commment" must_prompt="1"/>
+              <attribute name="request_type" read_only="1"/>
+              <attribute name="freeze_reason" hidden="1"/>
+              <attribute name="related_change_id_finalclass_recall"/>
+            </flags>
+            <transitions/>
+          </state>
+        </states>
+      </lifecycle>
+      <methods>
+        <method name="ComputeValues" static="false" access="public" type="Overload-DBObject"><![CDATA[	public function ComputeValues()
 	{
 		$sCurrRef = $this->Get('ref');
 		if (strlen($sCurrRef) == 0)
@@ -478,7 +479,7 @@
 
 		return parent::ComputeValues();
 	}]]></method>
-      <method name="GetIcon" static="false" access="public" type="Overload-DBObject"><comment><![CDATA[/**
+        <method name="GetIcon" static="false" access="public" type="Overload-DBObject"><comment><![CDATA[/**
 	 * Get the icon representing this object
 	 * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)
 	 * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file
@@ -544,7 +545,7 @@
 		}
 		return $sIcon;
 	}]]></method>
-      <method name="MakeIconFromName" static="true" access="protected" type="Overload-DBObject"><![CDATA[	protected static function MakeIconFromName($sIconName, $bImgTag = true)
+        <method name="MakeIconFromName" static="true" access="protected" type="Overload-DBObject"><![CDATA[	protected static function MakeIconFromName($sIconName, $bImgTag = true)
 	{
 		$sIcon = '';
 		if ($sIconName != '')
@@ -561,110 +562,111 @@
 		}
 		return $sIcon;
 	}]]></method>
-    </methods>
-    <presentation>
-      <details>
-        <items>
-          <item>document_list</item>
-          <item>ci_list</item>
-          <item>contact_list</item>
-          <item>incident_list</item>
-          <item key="col:col1">
-            <items>
-              <item key="fieldset:Ticket:baseinfo">
-                <items>
-                  <item>ref</item>
-                  <item>title</item>
-                  <item>org_id</item>
-                  <item>status</item>
-                  <item>priority</item>
-                  <item>request_type</item>
-                  <item>service_id</item>
-                  <item>servicesubcategory_id</item>
-                  <item>product</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:moreinfo">
-                <items>
-                  <item>impact</item>
-                  <item>urgency</item>
-                  <item>description</item>
-                  <item>resolution_code</item>
-                  <item>solution</item>
-                  <item>user_satisfaction</item>
-                  <item>user_commment</item>
-                  <item>freeze_reason</item>
-                </items>
-              </item>
-            </items>
-          </item>
-          <item key="col:col2">
-            <items>
-              <item key="fieldset:Ticket:date">
-                <items>
-                  <item>start_date</item>
-                  <item>last_update</item>
-                  <item>assignment_date</item>
-                  <item>tto_escalation_deadline</item>
-                  <item>ttr_escalation_deadline</item>
-                  <item>close_date</item>
-                  <item>closure_deadline</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:contact">
-                <items>
-                  <item>caller_id</item>
-                  <item>workgroup_id</item>
-                  <item>agent_id</item>
-                </items>
-              </item>
-              <item key="fieldset:Ticket:relation">
-                <items>
-                  <item>related_problem_id</item>
-                  <item>related_change_id</item>
-                </items>
-              </item>
-            </items>
-          </item>
-        </items>
-      </details>
-      <search>
-        <items>
-          <item>ref</item>
-          <item>title</item>
-          <item>org_id</item>
-          <item>request_type</item>
-          <item>start_date</item>
-          <item>status</item>
-          <item>caller_id</item>
-          <item>service_id</item>
-          <item>servicesubcategory_id</item>
-          <item>product</item>
-          <item>impact</item>
-          <item>urgency</item>
-          <item>priority</item>
-          <item>workgroup_id</item>
-          <item>agent_id</item>
-          <item>agent_email</item>
-          <item>close_date</item>
-          <item>resolution_code</item>
-          <item>solution</item>
-          <item>user_satisfaction</item>
-          <item>user_commment</item>
-        </items>
-      </search>
-      <list>
-        <items>
-          <item>title</item>
-          <item>org_id</item>
-          <item>start_date</item>
-          <item>status</item>
-          <item>service_id</item>
-          <item>priority</item>
-          <item>workgroup_id</item>
-          <item>agent_id</item>
-        </items>
-      </list>
-    </presentation>
-  </class>
-</classes>
+      </methods>
+      <presentation>
+        <details>
+          <items>
+            <item>document_list</item>
+            <item>ci_list</item>
+            <item>contact_list</item>
+            <item>incident_list</item>
+            <item key="col:col1">
+              <items>
+                <item key="fieldset:Ticket:baseinfo">
+                  <items>
+                    <item>ref</item>
+                    <item>title</item>
+                    <item>org_id</item>
+                    <item>status</item>
+                    <item>priority</item>
+                    <item>request_type</item>
+                    <item>service_id</item>
+                    <item>servicesubcategory_id</item>
+                    <item>product</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:moreinfo">
+                  <items>
+                    <item>impact</item>
+                    <item>urgency</item>
+                    <item>description</item>
+                    <item>resolution_code</item>
+                    <item>solution</item>
+                    <item>user_satisfaction</item>
+                    <item>user_commment</item>
+                    <item>freeze_reason</item>
+                  </items>
+                </item>
+              </items>
+            </item>
+            <item key="col:col2">
+              <items>
+                <item key="fieldset:Ticket:date">
+                  <items>
+                    <item>start_date</item>
+                    <item>last_update</item>
+                    <item>assignment_date</item>
+                    <item>tto_escalation_deadline</item>
+                    <item>ttr_escalation_deadline</item>
+                    <item>close_date</item>
+                    <item>closure_deadline</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:contact">
+                  <items>
+                    <item>caller_id</item>
+                    <item>workgroup_id</item>
+                    <item>agent_id</item>
+                  </items>
+                </item>
+                <item key="fieldset:Ticket:relation">
+                  <items>
+                    <item>related_problem_id</item>
+                    <item>related_change_id</item>
+                  </items>
+                </item>
+              </items>
+            </item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item>ref</item>
+            <item>title</item>
+            <item>org_id</item>
+            <item>request_type</item>
+            <item>start_date</item>
+            <item>status</item>
+            <item>caller_id</item>
+            <item>service_id</item>
+            <item>servicesubcategory_id</item>
+            <item>product</item>
+            <item>impact</item>
+            <item>urgency</item>
+            <item>priority</item>
+            <item>workgroup_id</item>
+            <item>agent_id</item>
+            <item>agent_email</item>
+            <item>close_date</item>
+            <item>resolution_code</item>
+            <item>solution</item>
+            <item>user_satisfaction</item>
+            <item>user_commment</item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item>title</item>
+            <item>org_id</item>
+            <item>start_date</item>
+            <item>status</item>
+            <item>service_id</item>
+            <item>priority</item>
+            <item>workgroup_id</item>
+            <item>agent_id</item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+  </classes>
+</itop_design>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 521 - 520
datamodel/itop-service-mgmt-1.0.0/datamodel.itop-service-mgmt.xml


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 572 - 571
datamodel/itop-tickets-1.0.0/datamodel.itop-tickets.xml


+ 9 - 4
setup/modelfactory.class.inc.php

@@ -270,6 +270,7 @@ class ModelFactory
 {
 	protected $sRootDir;
 	protected $oDOMDocument;
+	protected $oRoot;
 	protected $oClasses;
 	static protected $aLoadedClasses;
 	static protected $aWellKnownParents = array('DBObject', 'CMDBObject','cmdbAbstractObject');
@@ -280,8 +281,10 @@ class ModelFactory
 	{
 		$this->sRootDir = $sRootDir;
 		$this->oDOMDocument = new DOMDocument('1.0', 'UTF-8');
+		$this->oRoot = $this->oDOMDocument->CreateElement('itop_design');
+		$this->oDOMDocument->AppendChild($this->oRoot);
 		$this->oClasses = $this->oDOMDocument->CreateElement('classes');
-		$this->oDOMDocument->AppendChild($this->oClasses);
+		$this->oRoot->AppendChild($this->oClasses);
 		self::$aLoadedClasses = array();
 		self::$aLoadedModules = array();
 	}
@@ -315,7 +318,7 @@ class ModelFactory
 					$oNode->SetAttribute('_source', $sXmlFile);
 			}
 			$oXPath = new DOMXPath($oDocument);
-			$oNodeList = $oXPath->query('//classes/class');
+			$oNodeList = $oXPath->query('/itop_design/classes/class');
 			foreach($oNodeList as $oNode)
 			{
 				if ($oNode->hasAttribute('parent'))
@@ -1109,10 +1112,12 @@ EOF
 	public function GetDelta()
 	{
 		$oDelta = new DOMDocument('1.0', 'UTF-8');
-		$oRootNode = $oDelta->createElement('classes');
+		$oRootNode = $oDelta->createElement('itop_design');
 		$oDelta->appendChild($oRootNode);
+		$oClasses = $oDelta->createElement('classes');
+		$oRootNode->appendChild($oClasses);
 		
-		$this->_priv_ImportModifiedChildren($oDelta, $oRootNode, $this->oDOMDocument->firstChild);
+		$this->_priv_ImportModifiedChildren($oDelta, $oClasses, $this->oDOMDocument->firstChild);
 		//file_put_contents($sXMLDestPath, $oDelta->saveXML());
 		return $oDelta->saveXML();
 	}

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov