Browse Source

XML Datamodel: new format (version + zlists changed) - not compatible with 2.0 alpha!!!

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2342 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 năm trước cách đây
mục cha
commit
f789a770d0
25 tập tin đã thay đổi với 7073 bổ sung3257 xóa
  1. 38 18
      datamodels/1.x/itop-attachments/datamodel.itop-attachments.xml
  2. 574 206
      datamodels/1.x/itop-change-mgmt-1.0.0/datamodel.itop-change-mgmt.xml
  3. 498 192
      datamodels/1.x/itop-config-mgmt-1.0.0/datamodel.itop-config-mgmt.xml
  4. 221 80
      datamodels/1.x/itop-incident-mgmt-1.0.0/datamodel.itop-incident-mgmt.xml
  5. 143 65
      datamodels/1.x/itop-knownerror-mgmt-1.0.0/datamodel.itop-knownerror-mgmt.xml
  6. 152 59
      datamodels/1.x/itop-problem-mgmt-1.0.0/datamodel.itop-problem-mgmt.xml
  7. 1 1
      datamodels/1.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml
  8. 201 70
      datamodels/1.x/itop-request-mgmt-1.0.0/datamodel.itop-request-mgmt.xml
  9. 472 188
      datamodels/1.x/itop-service-mgmt-1.0.0/datamodel.itop-service-mgmt.xml
  10. 370 154
      datamodels/1.x/itop-tickets-1.0.0/datamodel.itop-tickets.xml
  11. 38 18
      datamodels/2.x/itop-attachments/datamodel.itop-attachments.xml
  12. 574 202
      datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml
  13. 904 807
      datamodels/2.x/itop-change-mgmt/datamodel.itop-change-mgmt.xml
  14. 462 181
      datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml
  15. 278 127
      datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml
  16. 197 87
      datamodels/2.x/itop-knownerror-mgmt/datamodel.itop-knownerror-mgmt.xml
  17. 153 54
      datamodels/2.x/itop-problem-mgmt/datamodel.itop-problem-mgmt.xml
  18. 1 1
      datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml
  19. 289 132
      datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml
  20. 293 139
      datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml
  21. 443 179
      datamodels/2.x/itop-service-mgmt-provider/datamodel.itop-service-mgmt-provider.xml
  22. 496 199
      datamodels/2.x/itop-service-mgmt/datamodel.itop-service-mgmt.xml
  23. 234 98
      datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
  24. 25 0
      setup/compiler.class.inc.php
  25. 16 0
      setup/modelfactory.class.inc.php

+ 38 - 18
datamodels/1.x/itop-attachments/datamodel.itop-attachments.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Attachment" _delta="define">
       <parent>DBObject</parent>
@@ -20,7 +20,7 @@
         <key_type>autoincrement</key_type>
         <db_table>attachment</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s %2$s</format>
           <attributes>
@@ -28,8 +28,8 @@
             <attribute id="temp_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id=""/>
@@ -39,22 +39,22 @@
       <fields>
         <field id="expire" xsi:type="AttributeDateTime">
           <sql>expire</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="temp_id" xsi:type="AttributeString">
           <sql>temp_id</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="item_class" xsi:type="AttributeString">
           <sql>item_class</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="item_id" xsi:type="AttributeString">
           <sql>item_id</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="item_org_id" xsi:type="AttributeInteger">
@@ -172,24 +172,44 @@
       <presentation>
         <details>
           <items>
-            <item>temp_id</item>
-            <item>item_class</item>
-            <item>item_id</item>
-            <item>item_org_id</item>
+            <item id="temp_id">
+              <rank>10</rank>
+            </item>
+            <item id="item_class">
+              <rank>20</rank>
+            </item>
+            <item id="item_id">
+              <rank>30</rank>
+            </item>
+            <item id="item_org_id">
+              <rank>40</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>temp_id</item>
-            <item>item_class</item>
-            <item>item_id</item>
+            <item id="temp_id">
+              <rank>10</rank>
+            </item>
+            <item id="item_class">
+              <rank>20</rank>
+            </item>
+            <item id="item_id">
+              <rank>30</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>temp_id</item>
-            <item>item_class</item>
-            <item>item_id</item>
+            <item id="temp_id">
+              <rank>10</rank>
+            </item>
+            <item id="item_class">
+              <rank>20</rank>
+            </item>
+            <item id="item_id">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 574 - 206
datamodels/1.x/itop-change-mgmt-1.0.0/datamodel.itop-change-mgmt.xml


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 498 - 192
datamodels/1.x/itop-config-mgmt-1.0.0/datamodel.itop-config-mgmt.xml


+ 221 - 80
datamodels/1.x/itop-incident-mgmt-1.0.0/datamodel.itop-incident-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Incident" _delta="define">
       <parent>ResponseTicket</parent>
@@ -15,14 +15,14 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_incident</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/incident.png</icon>
         <reconciliation>
           <attributes>
@@ -807,61 +807,130 @@
       <presentation>
         <details>
           <items>
-            <item>document_list</item>
-            <item>ci_list</item>
-            <item>contact_list</item>
-            <item>incident_list</item>
+            <item id="document_list">
+              <rank>10</rank>
+            </item>
+            <item id="ci_list">
+              <rank>20</rank>
+            </item>
+            <item id="contact_list">
+              <rank>30</rank>
+            </item>
+            <item id="incident_list">
+              <rank>40</rank>
+            </item>
             <item id="col:col1">
+              <rank>50</rank>
               <items>
                 <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
                   <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>
+                    <item id="ref">
+                      <rank>10</rank>
+                    </item>
+                    <item id="title">
+                      <rank>20</rank>
+                    </item>
+                    <item id="org_id">
+                      <rank>30</rank>
+                    </item>
+                    <item id="status">
+                      <rank>40</rank>
+                    </item>
+                    <item id="priority">
+                      <rank>50</rank>
+                    </item>
+                    <item id="service_id">
+                      <rank>60</rank>
+                    </item>
+                    <item id="servicesubcategory_id">
+                      <rank>70</rank>
+                    </item>
+                    <item id="product">
+                      <rank>80</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:moreinfo">
+                  <rank>20</rank>
                   <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 id="impact">
+                      <rank>10</rank>
+                    </item>
+                    <item id="urgency">
+                      <rank>20</rank>
+                    </item>
+                    <item id="description">
+                      <rank>30</rank>
+                    </item>
+                    <item id="resolution_code">
+                      <rank>40</rank>
+                    </item>
+                    <item id="solution">
+                      <rank>50</rank>
+                    </item>
+                    <item id="user_satisfaction">
+                      <rank>60</rank>
+                    </item>
+                    <item id="user_commment">
+                      <rank>70</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col2">
+              <rank>60</rank>
               <items>
                 <item id="fieldset:Ticket:date">
+                  <rank>10</rank>
                   <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>
+                    <item id="start_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>20</rank>
+                    </item>
+                    <item id="assignment_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="tto_escalation_deadline">
+                      <rank>40</rank>
+                    </item>
+                    <item id="ttr_escalation_deadline">
+                      <rank>50</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>60</rank>
+                    </item>
+                    <item id="closure_deadline">
+                      <rank>70</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
                   <items>
-                    <item>caller_id</item>
-                    <item>workgroup_id</item>
-                    <item>agent_id</item>
+                    <item id="caller_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="workgroup_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:relation">
+                  <rank>30</rank>
                   <items>
-                    <item>related_problem_id</item>
-                    <item>related_change_id</item>
+                    <item id="related_problem_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="related_change_id">
+                      <rank>20</rank>
+                    </item>
                   </items>
                 </item>
               </items>
@@ -870,38 +939,94 @@
         </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>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="org_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="caller_id">
+              <rank>60</rank>
+            </item>
+            <item id="service_id">
+              <rank>70</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>80</rank>
+            </item>
+            <item id="product">
+              <rank>90</rank>
+            </item>
+            <item id="impact">
+              <rank>100</rank>
+            </item>
+            <item id="urgency">
+              <rank>110</rank>
+            </item>
+            <item id="priority">
+              <rank>120</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>130</rank>
+            </item>
+            <item id="agent_id">
+              <rank>140</rank>
+            </item>
+            <item id="agent_email">
+              <rank>150</rank>
+            </item>
+            <item id="close_date">
+              <rank>160</rank>
+            </item>
+            <item id="resolution_code">
+              <rank>170</rank>
+            </item>
+            <item id="solution">
+              <rank>180</rank>
+            </item>
+            <item id="user_satisfaction">
+              <rank>190</rank>
+            </item>
+            <item id="user_commment">
+              <rank>200</rank>
+            </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>
+            <item id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="start_date">
+              <rank>30</rank>
+            </item>
+            <item id="status">
+              <rank>40</rank>
+            </item>
+            <item id="service_id">
+              <rank>50</rank>
+            </item>
+            <item id="priority">
+              <rank>60</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>70</rank>
+            </item>
+            <item id="agent_id">
+              <rank>80</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -915,15 +1040,15 @@
         <key_type>autoincrement</key_type>
         <db_table>lnktickettoincident</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ticket_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ticket_id"/>
@@ -937,7 +1062,7 @@
           <target_class>Ticket</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="ticket_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>ticket_id</extkey_attcode>
@@ -948,7 +1073,7 @@
           <target_class>Incident</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="incident_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>incident_id</extkey_attcode>
@@ -956,7 +1081,7 @@
         </field>
         <field id="reason" xsi:type="AttributeString">
           <sql>reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -964,22 +1089,38 @@
       <presentation>
         <details>
           <items>
-            <item>ticket_id</item>
-            <item>incident_id</item>
-            <item>reason</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="incident_id">
+              <rank>20</rank>
+            </item>
+            <item id="reason">
+              <rank>30</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>ticket_id</item>
-            <item>incident_id</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="incident_id">
+              <rank>20</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>ticket_id</item>
-            <item>incident_id</item>
-            <item>reason</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="incident_id">
+              <rank>20</rank>
+            </item>
+            <item id="reason">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -1007,27 +1148,27 @@
     <menu id="Incident:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
       <rank>3</rank>
       <parent>IncidentManagement</parent>
-      <template_file></template_file>
+      <template_file/>
     </menu>
     <menu id="Incident:MyIncidents" xsi:type="OQLMenuNode" _delta="define">
       <rank>1</rank>
       <parent>Incident:Shortcuts</parent>
       <oql><![CDATA[SELECT Incident WHERE agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="Incident:EscalatedIncidents" xsi:type="OQLMenuNode" _delta="define">
       <rank>2</rank>
       <parent>Incident:Shortcuts</parent>
       <oql><![CDATA[SELECT Incident WHERE status IN ("escalated_tto", "escalated_ttr")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="Incident:OpenIncidents" xsi:type="OQLMenuNode" _delta="define">
       <rank>3</rank>
       <parent>Incident:Shortcuts</parent>
       <oql><![CDATA[SELECT Incident WHERE status IN ("new", "assigned", "escalated_tto", "escalated_ttr", "resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>standard</auto_reload>
     </menu>
   </menus>

+ 143 - 65
datamodels/1.x/itop-knownerror-mgmt-1.0.0/datamodel.itop-knownerror-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="KnownError" _delta="define">
       <parent>cmdbAbstractObject</parent>
@@ -12,14 +12,14 @@
         <key_type>autoincrement</key_type>
         <db_table>known_error</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="name"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/known-error.png</icon>
         <reconciliation>
           <attributes>
@@ -31,7 +31,7 @@
       <fields>
         <field id="name" xsi:type="AttributeString">
           <sql>name</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="org_id" xsi:type="AttributeExternalKey">
@@ -39,7 +39,7 @@
           <target_class>Organization</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="cust_name" xsi:type="AttributeExternalField">
           <extkey_attcode>org_id</extkey_attcode>
@@ -50,7 +50,7 @@
           <target_class>Problem</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="problem_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>problem_id</extkey_attcode>
@@ -58,27 +58,27 @@
         </field>
         <field id="symptom" xsi:type="AttributeText">
           <sql>symptom</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="root_cause" xsi:type="AttributeText">
           <sql>rootcause</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="workaround" xsi:type="AttributeText">
           <sql>workaround</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="solution" xsi:type="AttributeText">
           <sql>solution</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="error_code" xsi:type="AttributeString">
           <sql>error_code</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="domain" xsi:type="AttributeEnum">
@@ -94,17 +94,17 @@
         </field>
         <field id="vendor" xsi:type="AttributeString">
           <sql>vendor</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="model" xsi:type="AttributeString">
           <sql>model</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="version" xsi:type="AttributeString">
           <sql>version</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="ci_list" xsi:type="AttributeLinkedSetIndirect">
@@ -126,38 +126,86 @@
       <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>
+            <item id="name">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="problem_id">
+              <rank>30</rank>
+            </item>
+            <item id="error_code">
+              <rank>40</rank>
+            </item>
+            <item id="domain">
+              <rank>50</rank>
+            </item>
+            <item id="vendor">
+              <rank>60</rank>
+            </item>
+            <item id="model">
+              <rank>70</rank>
+            </item>
+            <item id="version">
+              <rank>80</rank>
+            </item>
+            <item id="symptom">
+              <rank>90</rank>
+            </item>
+            <item id="root_cause">
+              <rank>100</rank>
+            </item>
+            <item id="workaround">
+              <rank>110</rank>
+            </item>
+            <item id="solution">
+              <rank>120</rank>
+            </item>
+            <item id="ci_list">
+              <rank>130</rank>
+            </item>
+            <item id="document_list">
+              <rank>140</rank>
+            </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>
+            <item id="name">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="problem_id">
+              <rank>30</rank>
+            </item>
+            <item id="error_code">
+              <rank>40</rank>
+            </item>
+            <item id="domain">
+              <rank>50</rank>
+            </item>
+            <item id="symptom">
+              <rank>60</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>org_id</item>
-            <item>problem_id</item>
-            <item>error_code</item>
-            <item>symptom</item>
+            <item id="org_id">
+              <rank>10</rank>
+            </item>
+            <item id="problem_id">
+              <rank>20</rank>
+            </item>
+            <item id="error_code">
+              <rank>30</rank>
+            </item>
+            <item id="symptom">
+              <rank>40</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -174,13 +222,13 @@
         <key_type>autoincrement</key_type>
         <db_table>infra_error_links</db_table>
         <db_key_field>link_id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>lnkInfraError</format>
           <attributes/>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="infra_id"/>
@@ -194,7 +242,7 @@
           <target_class>FunctionalCI</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="infra_name" xsi:type="AttributeExternalField">
           <extkey_attcode>infra_id</extkey_attcode>
@@ -209,7 +257,7 @@
           <target_class>KnownError</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="error_name" xsi:type="AttributeExternalField">
           <extkey_attcode>error_id</extkey_attcode>
@@ -217,7 +265,7 @@
         </field>
         <field id="reason" xsi:type="AttributeString">
           <sql>dummy</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -225,23 +273,41 @@
       <presentation>
         <details>
           <items>
-            <item>infra_id</item>
-            <item>error_id</item>
-            <item>reason</item>
+            <item id="infra_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_id">
+              <rank>20</rank>
+            </item>
+            <item id="reason">
+              <rank>30</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>infra_id</item>
-            <item>error_id</item>
+            <item id="infra_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_id">
+              <rank>20</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>infra_id</item>
-            <item>infra_status</item>
-            <item>error_id</item>
-            <item>reason</item>
+            <item id="infra_id">
+              <rank>10</rank>
+            </item>
+            <item id="infra_status">
+              <rank>20</rank>
+            </item>
+            <item id="error_id">
+              <rank>30</rank>
+            </item>
+            <item id="reason">
+              <rank>40</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -258,7 +324,7 @@
         <key_type>autoincrement</key_type>
         <db_table>documents_error_link</db_table>
         <db_key_field>link_id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
@@ -266,7 +332,7 @@
           </attributes>
         </naming>
         <display_template>../business/templates/default.html</display_template>
-        <icon></icon>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="doc_id"/>
@@ -280,7 +346,7 @@
           <target_class>Document</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="doc_name" xsi:type="AttributeExternalField">
           <extkey_attcode>doc_id</extkey_attcode>
@@ -291,7 +357,7 @@
           <target_class>KnownError</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="error_name" xsi:type="AttributeExternalField">
           <extkey_attcode>error_id</extkey_attcode>
@@ -299,7 +365,7 @@
         </field>
         <field id="link_type" xsi:type="AttributeString">
           <sql>link_type</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -307,16 +373,28 @@
       <presentation>
         <details>
           <items>
-            <item>doc_id</item>
-            <item>error_name</item>
-            <item>link_type</item>
+            <item id="doc_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_name">
+              <rank>20</rank>
+            </item>
+            <item id="link_type">
+              <rank>30</rank>
+            </item>
           </items>
         </details>
         <list>
           <items>
-            <item>doc_id</item>
-            <item>error_name</item>
-            <item>link_type</item>
+            <item id="doc_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_name">
+              <rank>20</rank>
+            </item>
+            <item id="link_type">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -339,7 +417,7 @@
     <menu id="Problem:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
       <rank>5</rank>
       <parent>ProblemManagement</parent>
-      <template_file></template_file>
+      <template_file/>
     </menu>
     <menu id="Problem:KnownErrors" xsi:type="OQLMenuNode" _delta="define">
       <rank>3</rank>

+ 152 - 59
datamodels/1.x/itop-problem-mgmt-1.0.0/datamodel.itop-problem-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Problem" _delta="define">
       <parent>Ticket</parent>
@@ -15,14 +15,14 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_problem</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/problem.png</icon>
         <reconciliation>
           <attributes>
@@ -54,7 +54,7 @@
           <target_class>Organization</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="org_name" xsi:type="AttributeExternalField">
           <extkey_attcode>org_id</extkey_attcode>
@@ -69,7 +69,7 @@
           <target_class>Service</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="service_name" xsi:type="AttributeExternalField">
           <extkey_attcode>service_id</extkey_attcode>
@@ -84,7 +84,7 @@
           <target_class>ServiceSubcategory</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="servicesubcategory_name" xsi:type="AttributeExternalField">
           <extkey_attcode>servicesubcategory_id</extkey_attcode>
@@ -92,7 +92,7 @@
         </field>
         <field id="product" xsi:type="AttributeString">
           <sql>product</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="impact" xsi:type="AttributeEnum">
@@ -135,7 +135,7 @@
           <target_class>Team</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="workgroup_name" xsi:type="AttributeExternalField">
           <extkey_attcode>workgroup_id</extkey_attcode>
@@ -150,7 +150,7 @@
           <target_class>Person</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="agent_name" xsi:type="AttributeExternalField">
           <extkey_attcode>agent_id</extkey_attcode>
@@ -165,7 +165,7 @@
           <target_class>Change</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="related_change_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>related_change_id</extkey_attcode>
@@ -173,22 +173,22 @@
         </field>
         <field id="close_date" xsi:type="AttributeDateTime">
           <sql>close_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="last_update" xsi:type="AttributeDateTime">
           <sql>last_update</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="assignment_date" xsi:type="AttributeDateTime">
           <sql>assignment_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_date" xsi:type="AttributeDateTime">
           <sql>resolution_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="knownerrors_list" xsi:type="AttributeLinkedSet">
@@ -570,52 +570,103 @@
       <presentation>
         <details>
           <items>
-            <item>document_list</item>
-            <item>ci_list</item>
-            <item>contact_list</item>
-            <item>incident_list</item>
+            <item id="document_list">
+              <rank>10</rank>
+            </item>
+            <item id="ci_list">
+              <rank>20</rank>
+            </item>
+            <item id="contact_list">
+              <rank>30</rank>
+            </item>
+            <item id="incident_list">
+              <rank>40</rank>
+            </item>
             <item id="col:col1">
+              <rank>50</rank>
               <items>
                 <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
                   <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>
+                    <item id="ref">
+                      <rank>10</rank>
+                    </item>
+                    <item id="title">
+                      <rank>20</rank>
+                    </item>
+                    <item id="org_id">
+                      <rank>30</rank>
+                    </item>
+                    <item id="status">
+                      <rank>40</rank>
+                    </item>
+                    <item id="priority">
+                      <rank>50</rank>
+                    </item>
+                    <item id="service_id">
+                      <rank>60</rank>
+                    </item>
+                    <item id="servicesubcategory_id">
+                      <rank>70</rank>
+                    </item>
+                    <item id="product">
+                      <rank>80</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:moreinfo">
+                  <rank>20</rank>
                   <items>
-                    <item>impact</item>
-                    <item>urgency</item>
-                    <item>description</item>
+                    <item id="impact">
+                      <rank>10</rank>
+                    </item>
+                    <item id="urgency">
+                      <rank>20</rank>
+                    </item>
+                    <item id="description">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col2">
+              <rank>60</rank>
               <items>
                 <item id="fieldset:Ticket:date">
+                  <rank>10</rank>
                   <items>
-                    <item>start_date</item>
-                    <item>last_update</item>
-                    <item>assignment_date</item>
-                    <item>close_date</item>
+                    <item id="start_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>20</rank>
+                    </item>
+                    <item id="assignment_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>40</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
                   <items>
-                    <item>workgroup_id</item>
-                    <item>agent_id</item>
+                    <item id="workgroup_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>20</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:relation">
+                  <rank>30</rank>
                   <items>
-                    <item>related_change_id</item>
+                    <item id="related_change_id">
+                      <rank>10</rank>
+                    </item>
                   </items>
                 </item>
               </items>
@@ -624,31 +675,73 @@
         </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>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="org_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="service_id">
+              <rank>60</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>70</rank>
+            </item>
+            <item id="product">
+              <rank>80</rank>
+            </item>
+            <item id="impact">
+              <rank>90</rank>
+            </item>
+            <item id="urgency">
+              <rank>100</rank>
+            </item>
+            <item id="priority">
+              <rank>110</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>120</rank>
+            </item>
+            <item id="agent_id">
+              <rank>130</rank>
+            </item>
+            <item id="agent_email">
+              <rank>140</rank>
+            </item>
+            <item id="close_date">
+              <rank>150</rank>
+            </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 id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="start_date">
+              <rank>30</rank>
+            </item>
+            <item id="status">
+              <rank>40</rank>
+            </item>
+            <item id="service_id">
+              <rank>50</rank>
+            </item>
+            <item id="priority">
+              <rank>60</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -674,13 +767,13 @@
       <rank>1</rank>
       <parent>Problem:Shortcuts</parent>
       <oql><![CDATA[SELECT Problem WHERE agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
     </menu>
     <menu id="Problem:OpenProblems" xsi:type="OQLMenuNode" _delta="define">
       <rank>2</rank>
       <parent>Problem:Shortcuts</parent>
       <oql><![CDATA[SELECT Problem WHERE status IN ("new", "assigned", "resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
     </menu>
   </menus>
 </itop_design>

+ 1 - 1
datamodels/1.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes/>
   <user_rights>
     <groups>

+ 201 - 70
datamodels/1.x/itop-request-mgmt-1.0.0/datamodel.itop-request-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="UserRequest" _delta="define">
       <parent>ResponseTicket</parent>
@@ -15,14 +15,14 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_request</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/user-request.png</icon>
         <reconciliation>
           <attributes>
@@ -50,7 +50,7 @@
         </field>
         <field id="freeze_reason" xsi:type="AttributeString">
           <sql>freeze_reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -852,63 +852,136 @@
       <presentation>
         <details>
           <items>
-            <item>document_list</item>
-            <item>ci_list</item>
-            <item>contact_list</item>
-            <item>incident_list</item>
+            <item id="document_list">
+              <rank>10</rank>
+            </item>
+            <item id="ci_list">
+              <rank>20</rank>
+            </item>
+            <item id="contact_list">
+              <rank>30</rank>
+            </item>
+            <item id="incident_list">
+              <rank>40</rank>
+            </item>
             <item id="col:col1">
+              <rank>50</rank>
               <items>
                 <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
                   <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>
+                    <item id="ref">
+                      <rank>10</rank>
+                    </item>
+                    <item id="title">
+                      <rank>20</rank>
+                    </item>
+                    <item id="org_id">
+                      <rank>30</rank>
+                    </item>
+                    <item id="status">
+                      <rank>40</rank>
+                    </item>
+                    <item id="priority">
+                      <rank>50</rank>
+                    </item>
+                    <item id="request_type">
+                      <rank>60</rank>
+                    </item>
+                    <item id="service_id">
+                      <rank>70</rank>
+                    </item>
+                    <item id="servicesubcategory_id">
+                      <rank>80</rank>
+                    </item>
+                    <item id="product">
+                      <rank>90</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:moreinfo">
+                  <rank>20</rank>
                   <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>
+                    <item id="impact">
+                      <rank>10</rank>
+                    </item>
+                    <item id="urgency">
+                      <rank>20</rank>
+                    </item>
+                    <item id="description">
+                      <rank>30</rank>
+                    </item>
+                    <item id="resolution_code">
+                      <rank>40</rank>
+                    </item>
+                    <item id="solution">
+                      <rank>50</rank>
+                    </item>
+                    <item id="user_satisfaction">
+                      <rank>60</rank>
+                    </item>
+                    <item id="user_commment">
+                      <rank>70</rank>
+                    </item>
+                    <item id="freeze_reason">
+                      <rank>80</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col2">
+              <rank>60</rank>
               <items>
                 <item id="fieldset:Ticket:date">
+                  <rank>10</rank>
                   <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>
+                    <item id="start_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>20</rank>
+                    </item>
+                    <item id="assignment_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="tto_escalation_deadline">
+                      <rank>40</rank>
+                    </item>
+                    <item id="ttr_escalation_deadline">
+                      <rank>50</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>60</rank>
+                    </item>
+                    <item id="closure_deadline">
+                      <rank>70</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
                   <items>
-                    <item>caller_id</item>
-                    <item>workgroup_id</item>
-                    <item>agent_id</item>
+                    <item id="caller_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="workgroup_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:relation">
+                  <rank>30</rank>
                   <items>
-                    <item>related_problem_id</item>
-                    <item>related_change_id</item>
+                    <item id="related_problem_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="related_change_id">
+                      <rank>20</rank>
+                    </item>
                   </items>
                 </item>
               </items>
@@ -917,39 +990,97 @@
         </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>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="org_id">
+              <rank>30</rank>
+            </item>
+            <item id="request_type">
+              <rank>40</rank>
+            </item>
+            <item id="start_date">
+              <rank>50</rank>
+            </item>
+            <item id="status">
+              <rank>60</rank>
+            </item>
+            <item id="caller_id">
+              <rank>70</rank>
+            </item>
+            <item id="service_id">
+              <rank>80</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>90</rank>
+            </item>
+            <item id="product">
+              <rank>100</rank>
+            </item>
+            <item id="impact">
+              <rank>110</rank>
+            </item>
+            <item id="urgency">
+              <rank>120</rank>
+            </item>
+            <item id="priority">
+              <rank>130</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>140</rank>
+            </item>
+            <item id="agent_id">
+              <rank>150</rank>
+            </item>
+            <item id="agent_email">
+              <rank>160</rank>
+            </item>
+            <item id="close_date">
+              <rank>170</rank>
+            </item>
+            <item id="resolution_code">
+              <rank>180</rank>
+            </item>
+            <item id="solution">
+              <rank>190</rank>
+            </item>
+            <item id="user_satisfaction">
+              <rank>200</rank>
+            </item>
+            <item id="user_commment">
+              <rank>210</rank>
+            </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>
+            <item id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="start_date">
+              <rank>30</rank>
+            </item>
+            <item id="status">
+              <rank>40</rank>
+            </item>
+            <item id="service_id">
+              <rank>50</rank>
+            </item>
+            <item id="priority">
+              <rank>60</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>70</rank>
+            </item>
+            <item id="agent_id">
+              <rank>80</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -977,27 +1108,27 @@
     <menu id="UserRequest:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
       <rank>3</rank>
       <parent>RequestManagement</parent>
-      <template_file></template_file>
+      <template_file/>
     </menu>
     <menu id="UserRequest:MyRequests" xsi:type="OQLMenuNode" _delta="define">
       <rank>1</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE agent_id = :current_contact_id AND status NOT IN ("closed","resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="UserRequest:EscalatedRequests" xsi:type="OQLMenuNode" _delta="define">
       <rank>2</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE status IN ("escalated_tto", "escalated_ttr")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="define">
       <rank>3</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE status IN ("new", "assigned", "escalated_tto", "escalated_ttr", "frozen", "resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
   </menus>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 472 - 188
datamodels/1.x/itop-service-mgmt-1.0.0/datamodel.itop-service-mgmt.xml


+ 370 - 154
datamodels/1.x/itop-tickets-1.0.0/datamodel.itop-tickets.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Ticket" _delta="define">
       <parent>cmdbAbstractObject</parent>
@@ -22,8 +22,8 @@
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ref"/>
@@ -33,27 +33,27 @@
       <fields>
         <field id="ref" xsi:type="AttributeString">
           <sql>ref</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="title" xsi:type="AttributeString">
           <sql>title</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="description" xsi:type="AttributeText">
           <sql>description</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="ticket_log" xsi:type="AttributeCaseLog">
           <sql>ticket_log</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="start_date" xsi:type="AttributeDateTime">
           <sql>start_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="document_list" xsi:type="AttributeLinkedSetIndirect">
@@ -89,31 +89,65 @@
       <presentation>
         <details>
           <items>
-            <item>ref</item>
-            <item>title</item>
-            <item>description</item>
-            <item>start_date</item>
-            <item>document_list</item>
-            <item>ci_list</item>
-            <item>contact_list</item>
-            <item>incident_list</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="description">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="document_list">
+              <rank>50</rank>
+            </item>
+            <item id="ci_list">
+              <rank>60</rank>
+            </item>
+            <item id="contact_list">
+              <rank>70</rank>
+            </item>
+            <item id="incident_list">
+              <rank>80</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>finalclass</item>
-            <item>ref</item>
-            <item>title</item>
-            <item>start_date</item>
+            <item id="finalclass">
+              <rank>10</rank>
+            </item>
+            <item id="ref">
+              <rank>20</rank>
+            </item>
+            <item id="title">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>finalclass</item>
-            <item>ref</item>
-            <item>title</item>
-            <item>ticket_log</item>
-            <item>start_date</item>
+            <item id="finalclass">
+              <rank>10</rank>
+            </item>
+            <item id="ref">
+              <rank>20</rank>
+            </item>
+            <item id="title">
+              <rank>30</rank>
+            </item>
+            <item id="ticket_log">
+              <rank>40</rank>
+            </item>
+            <item id="start_date">
+              <rank>50</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -126,15 +160,15 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_response</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ref"/>
@@ -165,7 +199,7 @@
           <target_class>Person</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="caller_email" xsi:type="AttributeExternalField">
           <extkey_attcode>caller_id</extkey_attcode>
@@ -176,7 +210,7 @@
           <target_class>Organization</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="org_name" xsi:type="AttributeExternalField">
           <extkey_attcode>org_id</extkey_attcode>
@@ -191,7 +225,7 @@
           <target_class>Service</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="service_name" xsi:type="AttributeExternalField">
           <extkey_attcode>service_id</extkey_attcode>
@@ -206,7 +240,7 @@
           <target_class>ServiceSubcategory</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="servicesubcategory_name" xsi:type="AttributeExternalField">
           <extkey_attcode>servicesubcategory_id</extkey_attcode>
@@ -214,7 +248,7 @@
         </field>
         <field id="product" xsi:type="AttributeString">
           <sql>product</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="impact" xsi:type="AttributeEnum">
@@ -257,7 +291,7 @@
           <target_class>Team</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="workgroup_name" xsi:type="AttributeExternalField">
           <extkey_attcode>workgroup_id</extkey_attcode>
@@ -272,7 +306,7 @@
           <target_class>Person</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="agent_name" xsi:type="AttributeExternalField">
           <extkey_attcode>agent_id</extkey_attcode>
@@ -287,7 +321,7 @@
           <target_class>Problem</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="related_problem_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>related_problem_id</extkey_attcode>
@@ -298,7 +332,7 @@
           <target_class>Change</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="related_change_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>related_change_id</extkey_attcode>
@@ -306,37 +340,37 @@
         </field>
         <field id="close_date" xsi:type="AttributeDateTime">
           <sql>close_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="last_update" xsi:type="AttributeDateTime">
           <sql>last_update</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="assignment_date" xsi:type="AttributeDateTime">
           <sql>assignment_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_date" xsi:type="AttributeDateTime">
           <sql>resolution_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="tto_escalation_deadline" xsi:type="AttributeDeadline">
           <sql>tto_escalation_deadline</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="ttr_escalation_deadline" xsi:type="AttributeDeadline">
           <sql>ttr_escalation_deadline</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="closure_deadline" xsi:type="AttributeDeadline">
           <sql>closure_deadline</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_code" xsi:type="AttributeEnum">
@@ -352,7 +386,7 @@
         </field>
         <field id="solution" xsi:type="AttributeText">
           <sql>solution</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="user_satisfaction" xsi:type="AttributeEnum">
@@ -368,7 +402,7 @@
         </field>
         <field id="user_commment" xsi:type="AttributeText">
           <sql>user_commment</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -1241,76 +1275,200 @@
       <presentation>
         <details>
           <items>
-            <item>ref</item>
-            <item>title</item>
-            <item>org_id</item>
-            <item>start_date</item>
-            <item>tto_escalation_deadline</item>
-            <item>ttr_escalation_deadline</item>
-            <item>closure_deadline</item>
-            <item>document_list</item>
-            <item>ci_list</item>
-            <item>contact_list</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>related_problem_id</item>
-            <item>related_change_id</item>
-            <item>close_date</item>
-            <item>last_update</item>
-            <item>assignment_date</item>
-            <item>resolution_code</item>
-            <item>solution</item>
-            <item>user_satisfaction</item>
-            <item>user_commment</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="org_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="tto_escalation_deadline">
+              <rank>50</rank>
+            </item>
+            <item id="ttr_escalation_deadline">
+              <rank>60</rank>
+            </item>
+            <item id="closure_deadline">
+              <rank>70</rank>
+            </item>
+            <item id="document_list">
+              <rank>80</rank>
+            </item>
+            <item id="ci_list">
+              <rank>90</rank>
+            </item>
+            <item id="contact_list">
+              <rank>100</rank>
+            </item>
+            <item id="status">
+              <rank>110</rank>
+            </item>
+            <item id="caller_id">
+              <rank>120</rank>
+            </item>
+            <item id="service_id">
+              <rank>130</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>140</rank>
+            </item>
+            <item id="product">
+              <rank>150</rank>
+            </item>
+            <item id="impact">
+              <rank>160</rank>
+            </item>
+            <item id="urgency">
+              <rank>170</rank>
+            </item>
+            <item id="priority">
+              <rank>180</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>190</rank>
+            </item>
+            <item id="agent_id">
+              <rank>200</rank>
+            </item>
+            <item id="agent_email">
+              <rank>210</rank>
+            </item>
+            <item id="related_problem_id">
+              <rank>220</rank>
+            </item>
+            <item id="related_change_id">
+              <rank>230</rank>
+            </item>
+            <item id="close_date">
+              <rank>240</rank>
+            </item>
+            <item id="last_update">
+              <rank>250</rank>
+            </item>
+            <item id="assignment_date">
+              <rank>260</rank>
+            </item>
+            <item id="resolution_code">
+              <rank>270</rank>
+            </item>
+            <item id="solution">
+              <rank>280</rank>
+            </item>
+            <item id="user_satisfaction">
+              <rank>290</rank>
+            </item>
+            <item id="user_commment">
+              <rank>300</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>finalclass</item>
-            <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>
+            <item id="finalclass">
+              <rank>10</rank>
+            </item>
+            <item id="ref">
+              <rank>20</rank>
+            </item>
+            <item id="title">
+              <rank>30</rank>
+            </item>
+            <item id="org_id">
+              <rank>40</rank>
+            </item>
+            <item id="start_date">
+              <rank>50</rank>
+            </item>
+            <item id="status">
+              <rank>60</rank>
+            </item>
+            <item id="caller_id">
+              <rank>70</rank>
+            </item>
+            <item id="service_id">
+              <rank>80</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>90</rank>
+            </item>
+            <item id="product">
+              <rank>100</rank>
+            </item>
+            <item id="impact">
+              <rank>110</rank>
+            </item>
+            <item id="urgency">
+              <rank>120</rank>
+            </item>
+            <item id="priority">
+              <rank>130</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>140</rank>
+            </item>
+            <item id="agent_id">
+              <rank>150</rank>
+            </item>
+            <item id="agent_email">
+              <rank>160</rank>
+            </item>
+            <item id="close_date">
+              <rank>170</rank>
+            </item>
+            <item id="resolution_code">
+              <rank>180</rank>
+            </item>
+            <item id="solution">
+              <rank>190</rank>
+            </item>
+            <item id="user_satisfaction">
+              <rank>200</rank>
+            </item>
+            <item id="user_commment">
+              <rank>210</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>finalclass</item>
-            <item>title</item>
-            <item>org_id</item>
-            <item>start_date</item>
-            <item>status</item>
-            <item>caller_id</item>
-            <item>service_id</item>
-            <item>priority</item>
-            <item>workgroup_id</item>
-            <item>agent_id</item>
-            <item>last_update</item>
+            <item id="finalclass">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="org_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="caller_id">
+              <rank>60</rank>
+            </item>
+            <item id="service_id">
+              <rank>70</rank>
+            </item>
+            <item id="priority">
+              <rank>80</rank>
+            </item>
+            <item id="workgroup_id">
+              <rank>90</rank>
+            </item>
+            <item id="agent_id">
+              <rank>100</rank>
+            </item>
+            <item id="last_update">
+              <rank>110</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -1324,15 +1482,15 @@
         <key_type>autoincrement</key_type>
         <db_table>lnktickettodoc</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ticket_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ticket_id"/>
@@ -1346,7 +1504,7 @@
           <target_class>Ticket</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="ticket_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>ticket_id</extkey_attcode>
@@ -1357,7 +1515,7 @@
           <target_class>Document</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="document_name" xsi:type="AttributeExternalField">
           <extkey_attcode>document_id</extkey_attcode>
@@ -1368,20 +1526,32 @@
       <presentation>
         <details>
           <items>
-            <item>ticket_id</item>
-            <item>document_id</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="document_id">
+              <rank>20</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>ticket_id</item>
-            <item>document_id</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="document_id">
+              <rank>20</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>ticket_id</item>
-            <item>document_id</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="document_id">
+              <rank>20</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -1395,15 +1565,15 @@
         <key_type>autoincrement</key_type>
         <db_table>lnktickettocontact</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ticket_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ticket_id"/>
@@ -1417,7 +1587,7 @@
           <target_class>Ticket</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="ticket_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>ticket_id</extkey_attcode>
@@ -1428,7 +1598,7 @@
           <target_class>Contact</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="contact_name" xsi:type="AttributeExternalField">
           <extkey_attcode>contact_id</extkey_attcode>
@@ -1440,7 +1610,7 @@
         </field>
         <field id="role" xsi:type="AttributeString">
           <sql>role</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -1448,26 +1618,50 @@
       <presentation>
         <details>
           <items>
-            <item>ticket_id</item>
-            <item>contact_id</item>
-            <item>contact_email</item>
-            <item>role</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="contact_id">
+              <rank>20</rank>
+            </item>
+            <item id="contact_email">
+              <rank>30</rank>
+            </item>
+            <item id="role">
+              <rank>40</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>ticket_id</item>
-            <item>contact_id</item>
-            <item>contact_email</item>
-            <item>role</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="contact_id">
+              <rank>20</rank>
+            </item>
+            <item id="contact_email">
+              <rank>30</rank>
+            </item>
+            <item id="role">
+              <rank>40</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>ticket_id</item>
-            <item>contact_id</item>
-            <item>contact_email</item>
-            <item>role</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="contact_id">
+              <rank>20</rank>
+            </item>
+            <item id="contact_email">
+              <rank>30</rank>
+            </item>
+            <item id="role">
+              <rank>40</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -1481,15 +1675,15 @@
         <key_type>autoincrement</key_type>
         <db_table>lnktickettoci</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ticket_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ticket_id"/>
@@ -1503,7 +1697,7 @@
           <target_class>Ticket</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="ticket_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>ticket_id</extkey_attcode>
@@ -1514,7 +1708,7 @@
           <target_class>FunctionalCI</target_class>
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="ci_name" xsi:type="AttributeExternalField">
           <extkey_attcode>ci_id</extkey_attcode>
@@ -1526,7 +1720,7 @@
         </field>
         <field id="impact" xsi:type="AttributeString">
           <sql>impact</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -1534,25 +1728,47 @@
       <presentation>
         <details>
           <items>
-            <item>ticket_id</item>
-            <item>ci_id</item>
-            <item>impact</item>
-            <item>ci_status</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="ci_id">
+              <rank>20</rank>
+            </item>
+            <item id="impact">
+              <rank>30</rank>
+            </item>
+            <item id="ci_status">
+              <rank>40</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>ticket_id</item>
-            <item>ci_id</item>
-            <item>ci_status</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="ci_id">
+              <rank>20</rank>
+            </item>
+            <item id="ci_status">
+              <rank>30</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>ticket_id</item>
-            <item>ci_id</item>
-            <item>impact</item>
-            <item>ci_status</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="ci_id">
+              <rank>20</rank>
+            </item>
+            <item id="impact">
+              <rank>30</rank>
+            </item>
+            <item id="ci_status">
+              <rank>40</rank>
+            </item>
           </items>
         </list>
       </presentation>

+ 38 - 18
datamodels/2.x/itop-attachments/datamodel.itop-attachments.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Attachment" _delta="define">
       <parent>DBObject</parent>
@@ -20,7 +20,7 @@
         <key_type>autoincrement</key_type>
         <db_table>attachment</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s %2$s</format>
           <attributes>
@@ -28,8 +28,8 @@
             <attribute id="temp_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id=""/>
@@ -39,22 +39,22 @@
       <fields>
         <field id="expire" xsi:type="AttributeDateTime">
           <sql>expire</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="temp_id" xsi:type="AttributeString">
           <sql>temp_id</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="item_class" xsi:type="AttributeString">
           <sql>item_class</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="item_id" xsi:type="AttributeString">
           <sql>item_id</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="item_org_id" xsi:type="AttributeInteger">
@@ -172,24 +172,44 @@
       <presentation>
         <details>
           <items>
-            <item>temp_id</item>
-            <item>item_class</item>
-            <item>item_id</item>
-            <item>item_org_id</item>
+            <item id="temp_id">
+              <rank>10</rank>
+            </item>
+            <item id="item_class">
+              <rank>20</rank>
+            </item>
+            <item id="item_id">
+              <rank>30</rank>
+            </item>
+            <item id="item_org_id">
+              <rank>40</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>temp_id</item>
-            <item>item_class</item>
-            <item>item_id</item>
+            <item id="temp_id">
+              <rank>10</rank>
+            </item>
+            <item id="item_class">
+              <rank>20</rank>
+            </item>
+            <item id="item_id">
+              <rank>30</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>temp_id</item>
-            <item>item_class</item>
-            <item>item_id</item>
+            <item id="temp_id">
+              <rank>10</rank>
+            </item>
+            <item id="item_class">
+              <rank>20</rank>
+            </item>
+            <item id="item_id">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 574 - 202
datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml


+ 904 - 807
datamodels/2.x/itop-change-mgmt/datamodel.itop-change-mgmt.xml

@@ -1,807 +1,904 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <classes>
-    <class id="Change" _delta="define">
-      <parent>Ticket</parent>
-      <properties>
-        <comment><![CDATA[/**
- * Persistent classes for a CMDB
- *
- * @copyright   Copyright (C) 2010-2012 Combodo SARL
- * @license     http://opensource.org/licenses/AGPL-3.0
- */]]></comment>
-        <category>bizmodel,searchable,changemgmt</category>
-        <abstract>false</abstract>
-        <key_type>autoincrement</key_type>
-        <db_table>ticket_change</db_table>
-        <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
-        <naming>
-          <format>%1$s</format>
-          <attributes>
-            <attribute id="ref"/>
-          </attributes>
-        </naming>
-        <display_template></display_template>
-        <icon>images/change.png</icon>
-        <reconciliation>
-          <attributes>
-            <attribute id="ref"/>
-          </attributes>
-        </reconciliation>
-      </properties>
-      <fields>
-        <field id="status" xsi:type="AttributeEnum">
-          <values>
-            <value>new</value>
-            <value>assigned</value>
-            <value>planned</value>
-            <value>approved</value>
-            <value>closed</value>
-            <value>rejected</value>
-          </values>
-          <sql>status</sql>
-          <default_value>new</default_value>
-          <is_null_allowed>true</is_null_allowed>
-        </field>
-        <field id="category" xsi:type="AttributeEnum">
-          <values>
-            <value>hardware</value>
-            <value>software</value>
-            <value>system</value>
-            <value>network</value>
-            <value>application</value>
-            <value>other</value>
-          </values>
-          <sql>category</sql>
-          <default_value>hardware</default_value>
-          <is_null_allowed>true</is_null_allowed>
-        </field>
-        <field id="reject_reason" xsi:type="AttributeText">
-          <sql>reject_reason</sql>
-          <default_value></default_value>
-          <is_null_allowed>true</is_null_allowed>
-        </field>
-        <field id="changemanager_id" xsi:type="AttributeExternalKey">
-          <sql>changemanager_id</sql>
-          <target_class>Person</target_class>
-          <is_null_allowed>true</is_null_allowed>
-          <on_target_delete>DEL_MANUAL</on_target_delete>
-        </field>
-        <field id="changemanager_email" xsi:type="AttributeExternalField">
-          <extkey_attcode>changemanager_id</extkey_attcode>
-          <target_attcode>email</target_attcode>
-        </field>
-        <field id="parent_id" xsi:type="AttributeExternalKey">
-          <filter><![CDATA[SELECT Change WHERE id != :this->id]]></filter>
-          <sql>parent_id</sql>
-          <target_class>Change</target_class>
-          <is_null_allowed>true</is_null_allowed>
-          <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
-        </field>
-        <field id="parent_name" xsi:type="AttributeExternalField">
-          <extkey_attcode>parent_id</extkey_attcode>
-          <target_attcode>ref</target_attcode>
-          <is_null_allowed>true</is_null_allowed>
-        </field>
-        <field id="creation_date" xsi:type="AttributeDateTime">
-          <sql>creation_date</sql>
-          <default_value></default_value>
-          <is_null_allowed>true</is_null_allowed>
-        </field>
-        <field id="approval_date" xsi:type="AttributeDateTime">
-          <sql>approval_date</sql>
-          <default_value></default_value>
-          <is_null_allowed>true</is_null_allowed>
-        </field>
-        <field id="fallback_plan" xsi:type="AttributeText">
-          <sql>fallback_plan</sql>
-          <default_value></default_value>
-          <is_null_allowed>true</is_null_allowed>
-        </field>
-        <field id="related_request_list" xsi:type="AttributeLinkedSet">
-          <linked_class>UserRequest</linked_class>
-          <ext_key_to_me>parent_change_id</ext_key_to_me>
-          <edit_mode>none</edit_mode>
-          <count_min>0</count_min>
-          <count_max>0</count_max>
-        </field>
-        <field id="related_incident_list" xsi:type="AttributeLinkedSet">
-          <linked_class>Incident</linked_class>
-          <ext_key_to_me>parent_change_id</ext_key_to_me>
-          <edit_mode>none</edit_mode>
-          <count_min>0</count_min>
-          <count_max>0</count_max>
-        </field>
-        <field id="related_problems_list" xsi:type="AttributeLinkedSet">
-          <linked_class>Problem</linked_class>
-          <ext_key_to_me>related_change_id</ext_key_to_me>
-          <edit_mode>none</edit_mode>
-          <count_min>0</count_min>
-          <count_max>0</count_max>
-        </field>
-        <field id="child_changes_list" xsi:type="AttributeLinkedSet">
-          <linked_class>Change</linked_class>
-          <ext_key_to_me>parent_id</ext_key_to_me>
-          <edit_mode>none</edit_mode>
-          <count_min>0</count_min>
-          <count_max>0</count_max>
-        </field>
-      </fields>
-      <lifecycle>
-        <attribute>status</attribute>
-        <stimuli>
-          <stimulus id="ev_assign" xsi:type="StimulusUserAction"/>
-          <stimulus id="ev_plan" xsi:type="StimulusUserAction"/>
-          <stimulus id="ev_reject" xsi:type="StimulusUserAction"/>
-          <stimulus id="ev_reopen" xsi:type="StimulusUserAction"/>
-          <stimulus id="ev_approve" xsi:type="StimulusUserAction"/>
-          <stimulus id="ev_finish" xsi:type="StimulusUserAction"/>
-        </stimuli>
-        <states>
-          <state id="new">
-            <flags>
-              <attribute id="ref">
-                <read_only/>
-              </attribute>
-              <attribute id="org_id">
-                <mandatory/>
-              </attribute>
-              <attribute id="title">
-                <mandatory/>
-              </attribute>
-              <attribute id="description">
-                <mandatory/>
-              </attribute>
-              <attribute id="last_update">
-                <read_only/>
-              </attribute>
-              <attribute id="close_date">
-                <hidden/>
-              </attribute>
-              <attribute id="reject_reason">
-                <hidden/>
-              </attribute>
-              <attribute id="creation_date">
-                <read_only/>
-              </attribute>
-              <attribute id="approval_date">
-                <hidden/>
-              </attribute>
-              <attribute id="caller_id">
-                <mandatory/>
-              </attribute>
-              <attribute id="team_id">
-                <hidden/>
-              </attribute>
-              <attribute id="agent_id">
-                <hidden/>
-              </attribute>
-              <attribute id="changemanager_id">
-                <hidden/>
-              </attribute>
-            </flags>
-            <transitions>
-              <transition>
-                <stimulus>ev_assign</stimulus>
-                <target>assigned</target>
-                <actions/>
-              </transition>
-            </transitions>
-          </state>
-          <state id="assigned">
-            <flags>
-              <attribute id="ref">
-                <read_only/>
-              </attribute>
-              <attribute id="org_id">
-                <mandatory/>
-              </attribute>
-              <attribute id="team_id">
-                <mandatory/>
-                <must_prompt/>
-              </attribute>
-              <attribute id="agent_id">
-                <mandatory/>
-                <must_prompt/>
-              </attribute>
-              <attribute id="title">
-                <mandatory/>
-              </attribute>
-              <attribute id="description">
-                <mandatory/>
-              </attribute>
-              <attribute id="last_update">
-                <read_only/>
-              </attribute>
-              <attribute id="close_date">
-                <hidden/>
-              </attribute>
-              <attribute id="reject_reason">
-                <hidden/>
-              </attribute>
-              <attribute id="changemanager_id">
-                <mandatory/>
-                <must_prompt/>
-              </attribute>
-              <attribute id="creation_date">
-                <read_only/>
-              </attribute>
-              <attribute id="approval_date">
-                <hidden/>
-              </attribute>
-            </flags>
-            <transitions>
-              <transition>
-                <stimulus>ev_plan</stimulus>
-                <target>planned</target>
-                <actions/>
-              </transition>
-            </transitions>
-          </state>
-          <state id="planned">
-            <flags>
-              <attribute id="ref">
-                <read_only/>
-              </attribute>
-              <attribute id="org_id">
-                <mandatory/>
-              </attribute>
-              <attribute id="title">
-                <mandatory/>
-              </attribute>
-              <attribute id="description">
-                <mandatory/>
-              </attribute>
-              <attribute id="start_date">
-                <mandatory/>
-                <must_prompt/>
-              </attribute>
-              <attribute id="end_date">
-                <mandatory/>
-                <must_prompt/>
-              </attribute>
-              <attribute id="last_update">
-                <read_only/>
-              </attribute>
-              <attribute id="close_date">
-                <hidden/>
-              </attribute>
-              <attribute id="reject_reason">
-                <hidden/>
-              </attribute>
-              <attribute id="creation_date">
-                <read_only/>
-              </attribute>
-              <attribute id="approval_date">
-                <hidden/>
-              </attribute>
-              <attribute id="fallback_plan">
-                <mandatory/>
-                <must_prompt/>
-              </attribute>
-              <attribute id="caller_id">
-                <mandatory/>
-              </attribute>
-              <attribute id="team_id">
-                <mandatory/>
-              </attribute>
-              <attribute id="agent_id">
-                <mandatory/>
-              </attribute>
-              <attribute id="changemanager_id">
-                <mandatory/>
-              </attribute>
-            </flags>
-            <transitions>
-              <transition>
-                <stimulus>ev_reject</stimulus>
-                <target>rejected</target>
-                <actions/>
-              </transition>
-              <transition>
-                <stimulus>ev_approve</stimulus>
-                <target>approved</target>
-                <actions>
-                  <action>
-                    <verb>SetApprovalDate</verb>
-                  </action>
-                </actions>
-              </transition>
-            </transitions>
-          </state>
-          <state id="rejected">
-            <flags>
-              <attribute id="ref">
-                <read_only/>
-              </attribute>
-              <attribute id="org_id">
-                <read_only/>
-              </attribute>
-              <attribute id="title">
-                <read_only/>
-              </attribute>
-              <attribute id="description">
-                <read_only/>
-              </attribute>
-              <attribute id="last_update">
-                <read_only/>
-              </attribute>
-              <attribute id="close_date">
-                <hidden/>
-              </attribute>
-              <attribute id="start_date">
-                <read_only/>
-              </attribute>
-              <attribute id="end_date">
-                <read_only/>
-              </attribute>
-              <attribute id="private_log">
-                <read_only/>
-              </attribute>
-              <attribute id="reject_reason">
-                <mandatory/>
-                <must_prompt/>
-              </attribute>
-              <attribute id="creation_date">
-                <read_only/>
-              </attribute>
-              <attribute id="approval_date">
-                <read_only/>
-              </attribute>
-              <attribute id="caller_id">
-                <read_only/>
-              </attribute>
-              <attribute id="team_id">
-                <read_only/>
-              </attribute>
-              <attribute id="agent_id">
-                <read_only/>
-              </attribute>
-              <attribute id="changemanager_id">
-                <read_only/>
-              </attribute>
-              <attribute id="private_log">
-                <read_only/>
-              </attribute>
-              <attribute id="fallback_plan">
-                <read_only/>
-              </attribute>
-              <attribute id="category">
-                <read_only/>
-              </attribute>
-              <attribute id="parent_id">
-                <read_only/>
-              </attribute>
-            </flags>
-            <transitions>
-              <transition>
-                <stimulus>ev_reopen</stimulus>
-                <target>assigned</target>
-                <actions/>
-              </transition>
-            </transitions>
-          </state>
-          <state id="approved">
-            <flags>
-              <attribute id="ref">
-                <read_only/>
-              </attribute>
-              <attribute id="org_id">
-                <read_only/>
-              </attribute>
-              <attribute id="title">
-                <read_only/>
-              </attribute>
-              <attribute id="description">
-                <read_only/>
-              </attribute>
-              <attribute id="last_update">
-                <read_only/>
-              </attribute>
-              <attribute id="close_date">
-                <hidden/>
-              </attribute>
-              <attribute id="start_date">
-                <read_only/>
-              </attribute>
-              <attribute id="end_date">
-                <read_only/>
-              </attribute>
-              <attribute id="private_log">
-                <normal/>
-              </attribute>
-              <attribute id="reject_reason">
-                <read_only/>
-              </attribute>
-              <attribute id="creation_date">
-                <hidden/>
-              </attribute>
-              <attribute id="approval_date">
-                <read_only/>
-              </attribute>
-              <attribute id="caller_id">
-                <read_only/>
-              </attribute>
-              <attribute id="team_id">
-                <read_only/>
-              </attribute>
-              <attribute id="agent_id">
-                <read_only/>
-              </attribute>
-              <attribute id="changemanager_id">
-                <read_only/>
-              </attribute>
-              <attribute id="fallback_plan">
-                <normal/>
-              </attribute>
-              <attribute id="category">
-                <normal/>
-              </attribute>
-              <attribute id="parent_id">
-                <normal/>
-              </attribute>
-            </flags>
-            <transitions>
-              <transition>
-                <stimulus>ev_finish</stimulus>
-                <target>closed</target>
-                <actions>
-                  <action>
-                    <verb>SetClosureDate</verb>
-                  </action>
-                </actions>
-              </transition>
-            </transitions>
-          </state>
-          <state id="closed">
-            <flags>
-              <attribute id="ref">
-                <read_only/>
-              </attribute>
-              <attribute id="org_id">
-                <read_only/>
-              </attribute>
-              <attribute id="title">
-                <read_only/>
-              </attribute>
-              <attribute id="description">
-                <read_only/>
-              </attribute>
-              <attribute id="last_update">
-                <read_only/>
-              </attribute>
-              <attribute id="close_date">
-                <read_only/>
-              </attribute>
-              <attribute id="start_date">
-                <read_only/>
-              </attribute>
-              <attribute id="end_date">
-                <read_only/>
-              </attribute>
-              <attribute id="reject_reason">
-                <read_only/>
-              </attribute>
-              <attribute id="creation_date">
-                <read_only/>
-              </attribute>
-              <attribute id="approval_date">
-                <read_only/>
-              </attribute>
-              <attribute id="caller_id">
-                <read_only/>
-              </attribute>
-              <attribute id="team_id">
-                <read_only/>
-              </attribute>
-              <attribute id="agent_id">
-                <read_only/>
-              </attribute>
-              <attribute id="changemanager_id">
-                <read_only/>
-              </attribute>
-              <attribute id="private_log">
-                <read_only/>
-              </attribute>
-              <attribute id="fallback_plan">
-                <read_only/>
-              </attribute>
-              <attribute id="category">
-                <read_only/>
-              </attribute>
-              <attribute id="parent_id">
-                <read_only/>
-              </attribute>
-            </flags>
-            <transitions/>
-          </state>
-        </states>
-      </lifecycle>
-      <methods>
-        <method id="SetApprovalDate">
-          <static>false</static>
-          <access>public</access>
-          <type>LifecycleAction</type>
-          <code><![CDATA[	public function SetApprovalDate($sStimulusCode)
-	{
-		$this->Set('approval_date', time());
-		return true;
-	}]]></code>
-        </method>
-        <method id="SetClosureDate">
-          <static>false</static>
-          <access>public</access>
-          <type>LifecycleAction</type>
-          <code><![CDATA[	public function SetClosureDate($sStimulusCode)
-	{
-		$this->Set('close_date', time());
-		return true;
-	}]]></code>
-        </method>
-        <method id="OnInsert">
-          <static>false</static>
-          <access>protected</access>
-          <type>Overload-DBObject</type>
-          <code><![CDATA[	protected function OnInsert()
-	{
-		$oToNotify = $this->Get('contacts_list');
-		$oToImpact = $this->Get('functionalcis_list');
-
-		$oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
-	
-		$aComputed = $oImpactedInfras->GetRelatedObjects('impacts', 10);
-	
-		if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
-		{
-			foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
-			{
-				$oNewLink = new lnkFunctionalCIToTicket();
-				$oNewLink->Set('functionalci_id', $iKey);
-				$oToImpact->AddObject($oNewLink);
-			}
-		}
-		if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
-		{
-			foreach($aComputed['Contact'] as $iKey => $oObject)
-			{
-				$oNewLink = new lnkContactToTicket();
-				$oNewLink->Set('contact_id', $iKey);
-				$oNewLink->Set('role', 'contact automatically computed');
-				$oToNotify->AddObject($oNewLink);
-			}
-		}
-
-		$this->Set('creation_date', time());
-		$this->Set('last_update', time());
-	}]]></code>
-        </method>
-        <method id="OnUpdate">
-          <static>false</static>
-          <access>protected</access>
-          <type>Overload-DBObject</type>
-          <code><![CDATA[	protected function OnUpdate()
-	{
-		$this->Set('last_update', time());
-	}]]></code>
-        </method>
-        <method id="ComputeValues">
-          <static>false</static>
-          <access>public</access>
-          <type>Overload-DBObject</type>
-          <code><![CDATA[	public function ComputeValues()
-	{
-		$sCurrRef = $this->Get('ref');
-		if (strlen($sCurrRef) == 0)
-		{
-			$iKey = $this->GetKey();
-			if ($iKey < 0)
-			{
-				// Object not yet in the Database
-				$iKey = MetaModel::GetNextKey(get_class($this));
-			}
-			$sName = sprintf('C-%06d', $iKey);
-			$this->Set('ref', $sName);
-		}
-	}]]></code>
-        </method>
-        <method id="GetIcon">
-          <comment>/**&#13;
-	 * Get the icon representing this object&#13;
-	 * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)&#13;
-	 * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file&#13;
-	 */</comment>
-          <static>false</static>
-          <access>public</access>
-          <type>Overload-DBObject</type>
-          <code><![CDATA[	public function GetIcon($bImgTag = true)
-	{
-		$sStatus = $this->Get('status');
-		switch($this->GetState())
-		{
-			case 'approved':
-			case 'implemented':
-			case 'monitored':
-			$sIcon = self::MakeIconFromName('change-approved.png');
-			break;
-			
-			case 'rejected':
-			case 'notapproved':
-			$sIcon = self::MakeIconFromName('change-rejected.png');
-			break;
-
-			case 'closed':
-			$sIcon = self::MakeIconFromName('change-closed.png');
-			break;
-
-			default:
-			$sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
-		}
-		return $sIcon;
-	}]]></code>
-        </method>
-        <method id="MakeIconFromName">
-          <static>true</static>
-          <access>protected</access>
-          <type>Overload-DBObject</type>
-          <code><![CDATA[	protected static function MakeIconFromName($sIconName, $bImgTag = true)
-	{
-		$sIcon = '';
-		if ($sIconName != '')
-		{
-			$sPath = '../modules/Sofaxis-change-mgmt/images/'.$sIconName;
-			if ($bImgTag)
-			{
-				$sIcon = "<img src=\"$sPath\" style=\"vertical-align:middle;\"/>";
-			}
-			else
-			{
-				$sIcon  = $sPath;
-			}
-		}
-		return $sIcon;
-	}]]></code>
-        </method>
-      </methods>
-      <presentation>
-        <details>
-          <items>
-            <item>functionalcis_list</item>
-            <item>contacts_list</item>
-            <item>workorders_list</item>
-            <item>related_request_list</item>
-	    <item>related_incident_list</item>
-	    <item>related_problems_list</item>
-	    <item>child_changes_list</item>
-            <item id="col:col1">
-              <items>
-                <item id="fieldset:Ticket:baseinfo">
-                  <items>
-                    <item>ref</item>
-                    <item>org_id</item>
-                    <item>status</item>
-                    <item>title</item>
-                    <item>description</item>
-                  </items>
-                </item>
-                <item id="fieldset:Ticket:contact">
-                  <items>
-                    <item>caller_id</item>
-                    <item>team_id</item>
-                    <item>agent_id</item>
-                    <item>changemanager_id</item>
-                  </items>
-                </item>
-              </items>
-            </item>
-            <item id="col:col2">
-              <items>
-                <item id="fieldset:Ticket:resolution">
-                  <items>
-                    <item>category</item>
-                    <item>reject_reason</item>
-                    <item>fallback_plan</item>
-                  </items>
-                </item>
-                <item id="fieldset:Relations">
-                  <items>
-                    <item>parent_id</item>
-                  </items>
-                </item>
-              </items>
-            </item>
-            <item id="col:col3">
-              <items>
-                <item id="fieldset:Ticket:date">
-                  <items>
-                    <item>creation_date</item>
-                    <item>start_date</item>
-                    <item>end_date</item>
-                    <item>last_update</item>
-
-                    <item>approval_date</item>
-                    <item>close_date</item>
-                  </items>
-                </item>
-              </items>
-            </item>
-          </items>
-        </details>
-        <search>
-          <items>
-            <item>ref</item>
-            <item>title</item>
-            <item>org_id</item>
-            <item>status</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>creation_date</item>
-            <item>last_update</item>
-            <item>close_date</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>changemanager_id</item>
-          </items>
-        </search>
-        <list>
-          <items>
-            <item>title</item>
-            <item>org_id</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>status</item>
-            <item>category</item>
-            <item>agent_id</item>
-          </items>
-        </list>
-      </presentation>
-    </class>
-  </classes>
-  <menus>
-    <menu id="ChangeManagement" xsi:type="MenuGroup" _delta="define">
-      <rank>50</rank>
-    </menu>
-    <menu id="Change:Overview" xsi:type="DashboardMenuNode" _delta="define">
-      <rank>0</rank>
-      <parent>ChangeManagement</parent>
-      <definition_file>overview.xml</definition_file>
-    </menu>
-    <menu id="NewChange" xsi:type="NewObjectMenuNode" _delta="define">
-      <rank>1</rank>
-      <parent>ChangeManagement</parent>
-      <class>Change</class>
-    </menu>
-    <menu id="SearchChanges" xsi:type="SearchMenuNode" _delta="define">
-      <rank>2</rank>
-      <parent>ChangeManagement</parent>
-      <class>Change</class>
-    </menu>
-    <menu id="Change:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
-      <rank>3</rank>
-      <parent>ChangeManagement</parent>
-      <template_file></template_file>
-    </menu>
-    <menu id="MyChanges" xsi:type="OQLMenuNode" _delta="define">
-      <rank>1</rank>
-      <parent>Change:Shortcuts</parent>
-      <oql><![CDATA[SELECT Change WHERE agent_id = :current_contact_id AND status NOT IN ("closed")]]></oql>
-      <do_search></do_search>
-      <auto_reload>fast</auto_reload>
-    </menu>
-    <menu id="Changes" xsi:type="OQLMenuNode" _delta="define">
-      <rank>2</rank>
-      <parent>Change:Shortcuts</parent>
-      <oql><![CDATA[SELECT Change WHERE status != "closed"]]></oql>
-      <do_search>1</do_search>
-      <auto_reload>fast</auto_reload>
-    </menu>
-    <menu id="WaitingApproval" xsi:type="OQLMenuNode" _delta="define">
-      <rank>3</rank>
-      <parent>Change:Shortcuts</parent>
-      <oql><![CDATA[SELECT Change WHERE status IN ("planned")]]></oql>
-      <do_search></do_search>
-      <auto_reload>fast</auto_reload>
-    </menu>
-  </menus>
-</itop_design>
+<?xml version="1.0" encoding="UTF-8"?>
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
+  <classes>
+    <class id="Change" _delta="define">
+      <parent>Ticket</parent>
+      <properties>
+        <comment><![CDATA[/**
+ * Persistent classes for a CMDB
+ *
+ * @copyright   Copyright (C) 2010-2012 Combodo SARL
+ * @license     http://opensource.org/licenses/AGPL-3.0
+ */]]></comment>
+        <category>bizmodel,searchable,changemgmt</category>
+        <abstract>false</abstract>
+        <key_type>autoincrement</key_type>
+        <db_table>ticket_change</db_table>
+        <db_key_field>id</db_key_field>
+        <db_final_class_field/>
+        <naming>
+          <format>%1$s</format>
+          <attributes>
+            <attribute id="ref"/>
+          </attributes>
+        </naming>
+        <display_template/>
+        <icon>images/change.png</icon>
+        <reconciliation>
+          <attributes>
+            <attribute id="ref"/>
+          </attributes>
+        </reconciliation>
+      </properties>
+      <fields>
+        <field id="status" xsi:type="AttributeEnum">
+          <values>
+            <value>new</value>
+            <value>assigned</value>
+            <value>planned</value>
+            <value>approved</value>
+            <value>closed</value>
+            <value>rejected</value>
+          </values>
+          <sql>status</sql>
+          <default_value>new</default_value>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="category" xsi:type="AttributeEnum">
+          <values>
+            <value>hardware</value>
+            <value>software</value>
+            <value>system</value>
+            <value>network</value>
+            <value>application</value>
+            <value>other</value>
+          </values>
+          <sql>category</sql>
+          <default_value>hardware</default_value>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="reject_reason" xsi:type="AttributeText">
+          <sql>reject_reason</sql>
+          <default_value/>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="changemanager_id" xsi:type="AttributeExternalKey">
+          <sql>changemanager_id</sql>
+          <target_class>Person</target_class>
+          <is_null_allowed>true</is_null_allowed>
+          <on_target_delete>DEL_MANUAL</on_target_delete>
+        </field>
+        <field id="changemanager_email" xsi:type="AttributeExternalField">
+          <extkey_attcode>changemanager_id</extkey_attcode>
+          <target_attcode>email</target_attcode>
+        </field>
+        <field id="parent_id" xsi:type="AttributeExternalKey">
+          <filter><![CDATA[SELECT Change WHERE id != :this->id]]></filter>
+          <sql>parent_id</sql>
+          <target_class>Change</target_class>
+          <is_null_allowed>true</is_null_allowed>
+          <on_target_delete>DEL_MANUAL</on_target_delete>
+          <jointype/>
+        </field>
+        <field id="parent_name" xsi:type="AttributeExternalField">
+          <extkey_attcode>parent_id</extkey_attcode>
+          <target_attcode>ref</target_attcode>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="creation_date" xsi:type="AttributeDateTime">
+          <sql>creation_date</sql>
+          <default_value/>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="approval_date" xsi:type="AttributeDateTime">
+          <sql>approval_date</sql>
+          <default_value/>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="fallback_plan" xsi:type="AttributeText">
+          <sql>fallback_plan</sql>
+          <default_value/>
+          <is_null_allowed>true</is_null_allowed>
+        </field>
+        <field id="related_request_list" xsi:type="AttributeLinkedSet">
+          <linked_class>UserRequest</linked_class>
+          <ext_key_to_me>parent_change_id</ext_key_to_me>
+          <edit_mode>none</edit_mode>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+        </field>
+        <field id="related_incident_list" xsi:type="AttributeLinkedSet">
+          <linked_class>Incident</linked_class>
+          <ext_key_to_me>parent_change_id</ext_key_to_me>
+          <edit_mode>none</edit_mode>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+        </field>
+        <field id="related_problems_list" xsi:type="AttributeLinkedSet">
+          <linked_class>Problem</linked_class>
+          <ext_key_to_me>related_change_id</ext_key_to_me>
+          <edit_mode>none</edit_mode>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+        </field>
+        <field id="child_changes_list" xsi:type="AttributeLinkedSet">
+          <linked_class>Change</linked_class>
+          <ext_key_to_me>parent_id</ext_key_to_me>
+          <edit_mode>none</edit_mode>
+          <count_min>0</count_min>
+          <count_max>0</count_max>
+        </field>
+      </fields>
+      <lifecycle>
+        <attribute>status</attribute>
+        <stimuli>
+          <stimulus id="ev_assign" xsi:type="StimulusUserAction"/>
+          <stimulus id="ev_plan" xsi:type="StimulusUserAction"/>
+          <stimulus id="ev_reject" xsi:type="StimulusUserAction"/>
+          <stimulus id="ev_reopen" xsi:type="StimulusUserAction"/>
+          <stimulus id="ev_approve" xsi:type="StimulusUserAction"/>
+          <stimulus id="ev_finish" xsi:type="StimulusUserAction"/>
+        </stimuli>
+        <states>
+          <state id="new">
+            <flags>
+              <attribute id="ref">
+                <read_only/>
+              </attribute>
+              <attribute id="org_id">
+                <mandatory/>
+              </attribute>
+              <attribute id="title">
+                <mandatory/>
+              </attribute>
+              <attribute id="description">
+                <mandatory/>
+              </attribute>
+              <attribute id="last_update">
+                <read_only/>
+              </attribute>
+              <attribute id="close_date">
+                <hidden/>
+              </attribute>
+              <attribute id="reject_reason">
+                <hidden/>
+              </attribute>
+              <attribute id="creation_date">
+                <read_only/>
+              </attribute>
+              <attribute id="approval_date">
+                <hidden/>
+              </attribute>
+              <attribute id="caller_id">
+                <mandatory/>
+              </attribute>
+              <attribute id="team_id">
+                <hidden/>
+              </attribute>
+              <attribute id="agent_id">
+                <hidden/>
+              </attribute>
+              <attribute id="changemanager_id">
+                <hidden/>
+              </attribute>
+            </flags>
+            <transitions>
+              <transition>
+                <stimulus>ev_assign</stimulus>
+                <target>assigned</target>
+                <actions/>
+              </transition>
+            </transitions>
+          </state>
+          <state id="assigned">
+            <flags>
+              <attribute id="ref">
+                <read_only/>
+              </attribute>
+              <attribute id="org_id">
+                <mandatory/>
+              </attribute>
+              <attribute id="team_id">
+                <mandatory/>
+                <must_prompt/>
+              </attribute>
+              <attribute id="agent_id">
+                <mandatory/>
+                <must_prompt/>
+              </attribute>
+              <attribute id="title">
+                <mandatory/>
+              </attribute>
+              <attribute id="description">
+                <mandatory/>
+              </attribute>
+              <attribute id="last_update">
+                <read_only/>
+              </attribute>
+              <attribute id="close_date">
+                <hidden/>
+              </attribute>
+              <attribute id="reject_reason">
+                <hidden/>
+              </attribute>
+              <attribute id="changemanager_id">
+                <mandatory/>
+                <must_prompt/>
+              </attribute>
+              <attribute id="creation_date">
+                <read_only/>
+              </attribute>
+              <attribute id="approval_date">
+                <hidden/>
+              </attribute>
+            </flags>
+            <transitions>
+              <transition>
+                <stimulus>ev_plan</stimulus>
+                <target>planned</target>
+                <actions/>
+              </transition>
+            </transitions>
+          </state>
+          <state id="planned">
+            <flags>
+              <attribute id="ref">
+                <read_only/>
+              </attribute>
+              <attribute id="org_id">
+                <mandatory/>
+              </attribute>
+              <attribute id="title">
+                <mandatory/>
+              </attribute>
+              <attribute id="description">
+                <mandatory/>
+              </attribute>
+              <attribute id="start_date">
+                <mandatory/>
+                <must_prompt/>
+              </attribute>
+              <attribute id="end_date">
+                <mandatory/>
+                <must_prompt/>
+              </attribute>
+              <attribute id="last_update">
+                <read_only/>
+              </attribute>
+              <attribute id="close_date">
+                <hidden/>
+              </attribute>
+              <attribute id="reject_reason">
+                <hidden/>
+              </attribute>
+              <attribute id="creation_date">
+                <read_only/>
+              </attribute>
+              <attribute id="approval_date">
+                <hidden/>
+              </attribute>
+              <attribute id="fallback_plan">
+                <mandatory/>
+                <must_prompt/>
+              </attribute>
+              <attribute id="caller_id">
+                <mandatory/>
+              </attribute>
+              <attribute id="team_id">
+                <mandatory/>
+              </attribute>
+              <attribute id="agent_id">
+                <mandatory/>
+              </attribute>
+              <attribute id="changemanager_id">
+                <mandatory/>
+              </attribute>
+            </flags>
+            <transitions>
+              <transition>
+                <stimulus>ev_reject</stimulus>
+                <target>rejected</target>
+                <actions/>
+              </transition>
+              <transition>
+                <stimulus>ev_approve</stimulus>
+                <target>approved</target>
+                <actions>
+                  <action>
+                    <verb>SetApprovalDate</verb>
+                  </action>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state id="rejected">
+            <flags>
+              <attribute id="ref">
+                <read_only/>
+              </attribute>
+              <attribute id="org_id">
+                <read_only/>
+              </attribute>
+              <attribute id="title">
+                <read_only/>
+              </attribute>
+              <attribute id="description">
+                <read_only/>
+              </attribute>
+              <attribute id="last_update">
+                <read_only/>
+              </attribute>
+              <attribute id="close_date">
+                <hidden/>
+              </attribute>
+              <attribute id="start_date">
+                <read_only/>
+              </attribute>
+              <attribute id="end_date">
+                <read_only/>
+              </attribute>
+              <attribute id="private_log">
+                <read_only/>
+              </attribute>
+              <attribute id="reject_reason">
+                <mandatory/>
+                <must_prompt/>
+              </attribute>
+              <attribute id="creation_date">
+                <read_only/>
+              </attribute>
+              <attribute id="approval_date">
+                <read_only/>
+              </attribute>
+              <attribute id="caller_id">
+                <read_only/>
+              </attribute>
+              <attribute id="team_id">
+                <read_only/>
+              </attribute>
+              <attribute id="agent_id">
+                <read_only/>
+              </attribute>
+              <attribute id="changemanager_id">
+                <read_only/>
+              </attribute>
+              <attribute id="private_log">
+                <read_only/>
+              </attribute>
+              <attribute id="fallback_plan">
+                <read_only/>
+              </attribute>
+              <attribute id="category">
+                <read_only/>
+              </attribute>
+              <attribute id="parent_id">
+                <read_only/>
+              </attribute>
+            </flags>
+            <transitions>
+              <transition>
+                <stimulus>ev_reopen</stimulus>
+                <target>assigned</target>
+                <actions/>
+              </transition>
+            </transitions>
+          </state>
+          <state id="approved">
+            <flags>
+              <attribute id="ref">
+                <read_only/>
+              </attribute>
+              <attribute id="org_id">
+                <read_only/>
+              </attribute>
+              <attribute id="title">
+                <read_only/>
+              </attribute>
+              <attribute id="description">
+                <read_only/>
+              </attribute>
+              <attribute id="last_update">
+                <read_only/>
+              </attribute>
+              <attribute id="close_date">
+                <hidden/>
+              </attribute>
+              <attribute id="start_date">
+                <read_only/>
+              </attribute>
+              <attribute id="end_date">
+                <read_only/>
+              </attribute>
+              <attribute id="private_log">
+                <normal/>
+              </attribute>
+              <attribute id="reject_reason">
+                <read_only/>
+              </attribute>
+              <attribute id="creation_date">
+                <hidden/>
+              </attribute>
+              <attribute id="approval_date">
+                <read_only/>
+              </attribute>
+              <attribute id="caller_id">
+                <read_only/>
+              </attribute>
+              <attribute id="team_id">
+                <read_only/>
+              </attribute>
+              <attribute id="agent_id">
+                <read_only/>
+              </attribute>
+              <attribute id="changemanager_id">
+                <read_only/>
+              </attribute>
+              <attribute id="fallback_plan">
+                <normal/>
+              </attribute>
+              <attribute id="category">
+                <normal/>
+              </attribute>
+              <attribute id="parent_id">
+                <normal/>
+              </attribute>
+            </flags>
+            <transitions>
+              <transition>
+                <stimulus>ev_finish</stimulus>
+                <target>closed</target>
+                <actions>
+                  <action>
+                    <verb>SetClosureDate</verb>
+                  </action>
+                </actions>
+              </transition>
+            </transitions>
+          </state>
+          <state id="closed">
+            <flags>
+              <attribute id="ref">
+                <read_only/>
+              </attribute>
+              <attribute id="org_id">
+                <read_only/>
+              </attribute>
+              <attribute id="title">
+                <read_only/>
+              </attribute>
+              <attribute id="description">
+                <read_only/>
+              </attribute>
+              <attribute id="last_update">
+                <read_only/>
+              </attribute>
+              <attribute id="close_date">
+                <read_only/>
+              </attribute>
+              <attribute id="start_date">
+                <read_only/>
+              </attribute>
+              <attribute id="end_date">
+                <read_only/>
+              </attribute>
+              <attribute id="reject_reason">
+                <read_only/>
+              </attribute>
+              <attribute id="creation_date">
+                <read_only/>
+              </attribute>
+              <attribute id="approval_date">
+                <read_only/>
+              </attribute>
+              <attribute id="caller_id">
+                <read_only/>
+              </attribute>
+              <attribute id="team_id">
+                <read_only/>
+              </attribute>
+              <attribute id="agent_id">
+                <read_only/>
+              </attribute>
+              <attribute id="changemanager_id">
+                <read_only/>
+              </attribute>
+              <attribute id="private_log">
+                <read_only/>
+              </attribute>
+              <attribute id="fallback_plan">
+                <read_only/>
+              </attribute>
+              <attribute id="category">
+                <read_only/>
+              </attribute>
+              <attribute id="parent_id">
+                <read_only/>
+              </attribute>
+            </flags>
+            <transitions/>
+          </state>
+        </states>
+      </lifecycle>
+      <methods>
+        <method id="SetApprovalDate">
+          <static>false</static>
+          <access>public</access>
+          <type>LifecycleAction</type>
+          <code><![CDATA[	public function SetApprovalDate($sStimulusCode)
+	{
+		$this->Set('approval_date', time());
+		return true;
+	}]]></code>
+        </method>
+        <method id="SetClosureDate">
+          <static>false</static>
+          <access>public</access>
+          <type>LifecycleAction</type>
+          <code><![CDATA[	public function SetClosureDate($sStimulusCode)
+	{
+		$this->Set('close_date', time());
+		return true;
+	}]]></code>
+        </method>
+        <method id="OnInsert">
+          <static>false</static>
+          <access>protected</access>
+          <type>Overload-DBObject</type>
+          <code><![CDATA[	protected function OnInsert()
+	{
+		$oToNotify = $this->Get('contacts_list');
+		$oToImpact = $this->Get('functionalcis_list');
+
+		$oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
+	
+		$aComputed = $oImpactedInfras->GetRelatedObjects('impacts', 10);
+	
+		if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
+		{
+			foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
+			{
+				$oNewLink = new lnkFunctionalCIToTicket();
+				$oNewLink->Set('functionalci_id', $iKey);
+				$oToImpact->AddObject($oNewLink);
+			}
+		}
+		if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
+		{
+			foreach($aComputed['Contact'] as $iKey => $oObject)
+			{
+				$oNewLink = new lnkContactToTicket();
+				$oNewLink->Set('contact_id', $iKey);
+				$oNewLink->Set('role', 'contact automatically computed');
+				$oToNotify->AddObject($oNewLink);
+			}
+		}
+
+		$this->Set('creation_date', time());
+		$this->Set('last_update', time());
+	}]]></code>
+        </method>
+        <method id="OnUpdate">
+          <static>false</static>
+          <access>protected</access>
+          <type>Overload-DBObject</type>
+          <code><![CDATA[	protected function OnUpdate()
+	{
+		$this->Set('last_update', time());
+	}]]></code>
+        </method>
+        <method id="ComputeValues">
+          <static>false</static>
+          <access>public</access>
+          <type>Overload-DBObject</type>
+          <code><![CDATA[	public function ComputeValues()
+	{
+		$sCurrRef = $this->Get('ref');
+		if (strlen($sCurrRef) == 0)
+		{
+			$iKey = $this->GetKey();
+			if ($iKey < 0)
+			{
+				// Object not yet in the Database
+				$iKey = MetaModel::GetNextKey(get_class($this));
+			}
+			$sName = sprintf('C-%06d', $iKey);
+			$this->Set('ref', $sName);
+		}
+	}]]></code>
+        </method>
+        <method id="GetIcon">
+          <comment>/**&#13;
+	 * Get the icon representing this object&#13;
+	 * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)&#13;
+	 * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file&#13;
+	 */</comment>
+          <static>false</static>
+          <access>public</access>
+          <type>Overload-DBObject</type>
+          <code><![CDATA[	public function GetIcon($bImgTag = true)
+	{
+		$sStatus = $this->Get('status');
+		switch($this->GetState())
+		{
+			case 'approved':
+			case 'implemented':
+			case 'monitored':
+			$sIcon = self::MakeIconFromName('change-approved.png');
+			break;
+			
+			case 'rejected':
+			case 'notapproved':
+			$sIcon = self::MakeIconFromName('change-rejected.png');
+			break;
+
+			case 'closed':
+			$sIcon = self::MakeIconFromName('change-closed.png');
+			break;
+
+			default:
+			$sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
+		}
+		return $sIcon;
+	}]]></code>
+        </method>
+        <method id="MakeIconFromName">
+          <static>true</static>
+          <access>protected</access>
+          <type>Overload-DBObject</type>
+          <code><![CDATA[	protected static function MakeIconFromName($sIconName, $bImgTag = true)
+	{
+		$sIcon = '';
+		if ($sIconName != '')
+		{
+			$sPath = '../modules/Sofaxis-change-mgmt/images/'.$sIconName;
+			if ($bImgTag)
+			{
+				$sIcon = "<img src=\"$sPath\" style=\"vertical-align:middle;\"/>";
+			}
+			else
+			{
+				$sIcon  = $sPath;
+			}
+		}
+		return $sIcon;
+	}]]></code>
+        </method>
+      </methods>
+      <presentation>
+        <details>
+          <items>
+            <item id="functionalcis_list">
+              <rank>10</rank>
+            </item>
+            <item id="contacts_list">
+              <rank>20</rank>
+            </item>
+            <item id="workorders_list">
+              <rank>30</rank>
+            </item>
+            <item id="related_request_list">
+              <rank>40</rank>
+            </item>
+            <item id="related_incident_list">
+              <rank>50</rank>
+            </item>
+            <item id="related_problems_list">
+              <rank>60</rank>
+            </item>
+            <item id="child_changes_list">
+              <rank>70</rank>
+            </item>
+            <item id="col:col1">
+              <rank>80</rank>
+              <items>
+                <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
+                  <items>
+                    <item id="ref">
+                      <rank>10</rank>
+                    </item>
+                    <item id="org_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="status">
+                      <rank>30</rank>
+                    </item>
+                    <item id="title">
+                      <rank>40</rank>
+                    </item>
+                    <item id="description">
+                      <rank>50</rank>
+                    </item>
+                  </items>
+                </item>
+                <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
+                  <items>
+                    <item id="caller_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="team_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>30</rank>
+                    </item>
+                    <item id="changemanager_id">
+                      <rank>40</rank>
+                    </item>
+                  </items>
+                </item>
+              </items>
+            </item>
+            <item id="col:col2">
+              <rank>90</rank>
+              <items>
+                <item id="fieldset:Ticket:resolution">
+                  <rank>10</rank>
+                  <items>
+                    <item id="category">
+                      <rank>10</rank>
+                    </item>
+                    <item id="reject_reason">
+                      <rank>20</rank>
+                    </item>
+                    <item id="fallback_plan">
+                      <rank>30</rank>
+                    </item>
+                  </items>
+                </item>
+                <item id="fieldset:Relations">
+                  <rank>20</rank>
+                  <items>
+                    <item id="parent_id">
+                      <rank>10</rank>
+                    </item>
+                  </items>
+                </item>
+              </items>
+            </item>
+            <item id="col:col3">
+              <rank>100</rank>
+              <items>
+                <item id="fieldset:Ticket:date">
+                  <rank>10</rank>
+                  <items>
+                    <item id="creation_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="start_date">
+                      <rank>20</rank>
+                    </item>
+                    <item id="end_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>40</rank>
+                    </item>
+                    <item id="approval_date">
+                      <rank>50</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>60</rank>
+                    </item>
+                  </items>
+                </item>
+              </items>
+            </item>
+          </items>
+        </details>
+        <search>
+          <items>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="org_id">
+              <rank>30</rank>
+            </item>
+            <item id="status">
+              <rank>40</rank>
+            </item>
+            <item id="start_date">
+              <rank>50</rank>
+            </item>
+            <item id="end_date">
+              <rank>60</rank>
+            </item>
+            <item id="creation_date">
+              <rank>70</rank>
+            </item>
+            <item id="last_update">
+              <rank>80</rank>
+            </item>
+            <item id="close_date">
+              <rank>90</rank>
+            </item>
+            <item id="team_id">
+              <rank>100</rank>
+            </item>
+            <item id="agent_id">
+              <rank>110</rank>
+            </item>
+            <item id="changemanager_id">
+              <rank>120</rank>
+            </item>
+          </items>
+        </search>
+        <list>
+          <items>
+            <item id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="start_date">
+              <rank>30</rank>
+            </item>
+            <item id="end_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="category">
+              <rank>60</rank>
+            </item>
+            <item id="agent_id">
+              <rank>70</rank>
+            </item>
+          </items>
+        </list>
+      </presentation>
+    </class>
+  </classes>
+  <menus>
+    <menu id="ChangeManagement" xsi:type="MenuGroup" _delta="define">
+      <rank>50</rank>
+    </menu>
+    <menu id="Change:Overview" xsi:type="DashboardMenuNode" _delta="define">
+      <rank>0</rank>
+      <parent>ChangeManagement</parent>
+      <definition_file>overview.xml</definition_file>
+    </menu>
+    <menu id="NewChange" xsi:type="NewObjectMenuNode" _delta="define">
+      <rank>1</rank>
+      <parent>ChangeManagement</parent>
+      <class>Change</class>
+    </menu>
+    <menu id="SearchChanges" xsi:type="SearchMenuNode" _delta="define">
+      <rank>2</rank>
+      <parent>ChangeManagement</parent>
+      <class>Change</class>
+    </menu>
+    <menu id="Change:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
+      <rank>3</rank>
+      <parent>ChangeManagement</parent>
+      <template_file/>
+    </menu>
+    <menu id="MyChanges" xsi:type="OQLMenuNode" _delta="define">
+      <rank>1</rank>
+      <parent>Change:Shortcuts</parent>
+      <oql><![CDATA[SELECT Change WHERE agent_id = :current_contact_id AND status NOT IN ("closed")]]></oql>
+      <do_search/>
+      <auto_reload>fast</auto_reload>
+    </menu>
+    <menu id="Changes" xsi:type="OQLMenuNode" _delta="define">
+      <rank>2</rank>
+      <parent>Change:Shortcuts</parent>
+      <oql><![CDATA[SELECT Change WHERE status != "closed"]]></oql>
+      <do_search>1</do_search>
+      <auto_reload>fast</auto_reload>
+    </menu>
+    <menu id="WaitingApproval" xsi:type="OQLMenuNode" _delta="define">
+      <rank>3</rank>
+      <parent>Change:Shortcuts</parent>
+      <oql><![CDATA[SELECT Change WHERE status IN ("planned")]]></oql>
+      <do_search/>
+      <auto_reload>fast</auto_reload>
+    </menu>
+  </menus>
+</itop_design>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 462 - 181
datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml


+ 278 - 127
datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Incident" _delta="define">
       <parent>Ticket</parent>
@@ -15,14 +15,14 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_incident</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/incident.png</icon>
         <reconciliation>
           <attributes>
@@ -131,57 +131,57 @@
         </field>
         <field id="escalation_reason" xsi:type="AttributeString">
           <sql>escalation_reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="assignment_date" xsi:type="AttributeDateTime">
           <sql>assignment_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_date" xsi:type="AttributeDateTime">
           <sql>resolution_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="last_pending_date" xsi:type="AttributeDateTime">
           <sql>last_pending_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="cumulatedpending" xsi:type="AttributeStopWatch">
           <states>
             <state id="pending"/>
           </states>
-          <working_time></working_time>
-	   <thresholds/>
-          <goal></goal>
+          <working_time/>
+          <thresholds/>
+          <goal/>
         </field>
         <field id="tto" xsi:type="AttributeStopWatch">
           <states>
             <state id="new"/>
             <state id="escalated_tto"/>
           </states>
-          <working_time></working_time>
+          <working_time/>
           <goal>ResponseTicketTTO</goal>
           <thresholds>
             <threshold>
-            	<percent>75</percent>
-            	<actions>
+              <percent>75</percent>
+              <actions>
 		</actions>
             </threshold>
             <threshold>
-            	<percent>100</percent>
-            	<actions>
-            	  <action>
-            	    <verb>ApplyStimulus</verb>
-            	    <params>
-            	      <param>ev_timeout</param>
-            	    </params>
-            	  </action>
-		</actions>
+              <percent>100</percent>
+              <actions>
+                <action>
+                  <verb>ApplyStimulus</verb>
+                  <params>
+                    <param>ev_timeout</param>
+                  </params>
+                </action>
+              </actions>
             </threshold>
-	   </thresholds>
+          </thresholds>
         </field>
         <field id="ttr" xsi:type="AttributeStopWatch">
           <states>
@@ -190,54 +190,54 @@
             <state id="assigned"/>
             <state id="escalated_ttr"/>
           </states>
-          <working_time></working_time>
+          <working_time/>
           <goal>ResponseTicketTTR</goal>
           <thresholds>
             <threshold>
-            	<percent>75</percent>
-            	<actions>
+              <percent>75</percent>
+              <actions>
 		</actions>
             </threshold>
             <threshold>
-            	<percent>100</percent>
-            	<actions>
-            	  <action>
-            	    <verb>ApplyStimulus</verb>
-            	    <params>
-            	      <param>ev_timeout</param>
-            	    </params>
-            	  </action>
-		</actions>
+              <percent>100</percent>
+              <actions>
+                <action>
+                  <verb>ApplyStimulus</verb>
+                  <params>
+                    <param>ev_timeout</param>
+                  </params>
+                </action>
+              </actions>
             </threshold>
-	  </thresholds>
+          </thresholds>
         </field>
         <field id="tto_escalation_deadline" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_deadline</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_deadline</item_code>
         </field>
         <field id="sla_tto_passed" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_passed</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_passed</item_code>
         </field>
         <field id="sla_tto_over" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_overrun</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_overrun</item_code>
         </field>
         <field id="ttr_escalation_deadline" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_deadline</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_deadline</item_code>
         </field>
         <field id="sla_ttr_passed" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_passed</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_passed</item_code>
         </field>
         <field id="sla_ttr_over" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_overrun</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_overrun</item_code>
         </field>
         <field id="time_spent" xsi:type="AttributeDuration">
           <sql>time_spent</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_code" xsi:type="AttributeEnum">
@@ -257,12 +257,12 @@
         </field>
         <field id="solution" xsi:type="AttributeText">
           <sql>solution</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="pending_reason" xsi:type="AttributeText">
           <sql>pending_reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="parent_incident_id" xsi:type="AttributeExternalKey">
@@ -314,7 +314,7 @@
         </field>
         <field id="public_log" xsi:type="AttributeCaseLog">
           <sql>public_log</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="user_satisfaction" xsi:type="AttributeEnum">
@@ -331,7 +331,7 @@
         </field>
         <field id="user_comment" xsi:type="AttributeText">
           <sql>user_commment</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -840,7 +840,7 @@
               <attribute id="org_id">
                 <read_only/>
               </attribute>
-               <attribute id="caller_id">
+              <attribute id="caller_id">
                 <read_only/>
               </attribute>
               <attribute id="origin">
@@ -1621,87 +1621,180 @@
       <presentation>
         <details>
           <items>
-            <item>functionalcis_list</item>
-            <item>contacts_list</item>
-	    <item>child_incidents_list</item>
-            <item>related_request_list</item>
-            <item>workorders_list</item>
+            <item id="functionalcis_list">
+              <rank>10</rank>
+            </item>
+            <item id="contacts_list">
+              <rank>20</rank>
+            </item>
+            <item id="child_incidents_list">
+              <rank>30</rank>
+            </item>
+            <item id="related_request_list">
+              <rank>40</rank>
+            </item>
+            <item id="workorders_list">
+              <rank>50</rank>
+            </item>
             <item id="col:col1">
+              <rank>60</rank>
               <items>
                 <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
                   <items>
-                    <item>org_id</item>
-                    <item>caller_id</item>
-                    <item>status</item>
-                    <item>origin</item>
-                    <item>title</item>
-                    <item>description</item>
+                    <item id="org_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="caller_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="status">
+                      <rank>30</rank>
+                    </item>
+                    <item id="origin">
+                      <rank>40</rank>
+                    </item>
+                    <item id="title">
+                      <rank>50</rank>
+                    </item>
+                    <item id="description">
+                      <rank>60</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:moreinfo">
+                  <rank>20</rank>
                   <items>
-                    <item>service_id</item>
-                    <item>servicesubcategory_id</item>
-                    <item>escalation_flag</item>
-                    <item>escalation_reason</item>
-                    <item>pending_reason</item>
+                    <item id="service_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="servicesubcategory_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="escalation_flag">
+                      <rank>30</rank>
+                    </item>
+                    <item id="escalation_reason">
+                      <rank>40</rank>
+                    </item>
+                    <item id="pending_reason">
+                      <rank>50</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col2">
+              <rank>70</rank>
               <items>
                 <item id="fieldset:Ticket:Type">
+                  <rank>10</rank>
                   <items>
-                    <item>impact</item>
-                    <item>emergency</item>
-                    <item>priority</item>
+                    <item id="impact">
+                      <rank>10</rank>
+                    </item>
+                    <item id="emergency">
+                      <rank>20</rank>
+                    </item>
+                    <item id="priority">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
                   <items>
-                    <item>team_id</item>
-                    <item>agent_id</item>
+                    <item id="team_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>20</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:date">
+                  <rank>30</rank>
                   <items>
-                    <item>start_date</item>
-                    <item>last_update</item>
-                    <item>assignment_date</item>
-                    <item>tto_escalation_deadline</item>
-                    <item>ttr_escalation_deadline</item>
-                    <item>last_pending_date</item>
-                    <item>resolution_date</item>
-                    <item>close_date</item>
+                    <item id="start_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>20</rank>
+                    </item>
+                    <item id="assignment_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="tto_escalation_deadline">
+                      <rank>40</rank>
+                    </item>
+                    <item id="ttr_escalation_deadline">
+                      <rank>50</rank>
+                    </item>
+                    <item id="last_pending_date">
+                      <rank>60</rank>
+                    </item>
+                    <item id="resolution_date">
+                      <rank>70</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>80</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col3">
+              <rank>80</rank>
               <items>
                 <item id="fieldset:Relations">
+                  <rank>10</rank>
                   <items>
-                    <item>parent_incident_id</item>
-                    <item>parent_problem_id</item>
-                    <item>parent_change_id</item>
+                    <item id="parent_incident_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="parent_problem_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="parent_change_id">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:resolution">
+                  <rank>20</rank>
                   <items>
-                    <item>resolution_code</item>
-                    <item>solution</item>
-                    <item>time_spent</item>
-                    <item>user_satisfaction</item>
-                    <item>user_comment</item>
+                    <item id="resolution_code">
+                      <rank>10</rank>
+                    </item>
+                    <item id="solution">
+                      <rank>20</rank>
+                    </item>
+                    <item id="time_spent">
+                      <rank>30</rank>
+                    </item>
+                    <item id="user_satisfaction">
+                      <rank>40</rank>
+                    </item>
+                    <item id="user_comment">
+                      <rank>50</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:SLA">
+                  <rank>30</rank>
                   <items>
-		   <item>sla_tto_passed</item>
-		   <item>sla_tto_over</item>
-		   <item>sla_ttr_passed</item>
-		   <item>sla_ttr_over</item>
+                    <item id="sla_tto_passed">
+                      <rank>10</rank>
+                    </item>
+                    <item id="sla_tto_over">
+                      <rank>20</rank>
+                    </item>
+                    <item id="sla_ttr_passed">
+                      <rank>30</rank>
+                    </item>
+                    <item id="sla_ttr_over">
+                      <rank>40</rank>
+                    </item>
                   </items>
                 </item>
               </items>
@@ -1710,39 +1803,97 @@
         </details>
         <search>
           <items>
-            <item>ref</item>
-            <item>org_id</item>
-            <item>title</item>
-            <item>description</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>resolution_date</item>
-            <item>close_date</item>
-            <item>status</item>
-            <item>caller_id</item>
-            <item>origin</item>
-            <item>impact</item>
-            <item>emergency</item>
-            <item>priority</item>
-            <item>service_id</item>
-            <item>servicesubcategory_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>escalation_flag</item>
-            <item>resolution_code</item>
-            <item>user_satisfaction</item>
-	    <item>sla_tto_passed</item>
-	    <item>sla_ttr_passed</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="title">
+              <rank>30</rank>
+            </item>
+            <item id="description">
+              <rank>40</rank>
+            </item>
+            <item id="start_date">
+              <rank>50</rank>
+            </item>
+            <item id="end_date">
+              <rank>60</rank>
+            </item>
+            <item id="resolution_date">
+              <rank>70</rank>
+            </item>
+            <item id="close_date">
+              <rank>80</rank>
+            </item>
+            <item id="status">
+              <rank>90</rank>
+            </item>
+            <item id="caller_id">
+              <rank>100</rank>
+            </item>
+            <item id="origin">
+              <rank>110</rank>
+            </item>
+            <item id="impact">
+              <rank>120</rank>
+            </item>
+            <item id="emergency">
+              <rank>130</rank>
+            </item>
+            <item id="priority">
+              <rank>140</rank>
+            </item>
+            <item id="service_id">
+              <rank>150</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>160</rank>
+            </item>
+            <item id="team_id">
+              <rank>170</rank>
+            </item>
+            <item id="agent_id">
+              <rank>180</rank>
+            </item>
+            <item id="escalation_flag">
+              <rank>190</rank>
+            </item>
+            <item id="resolution_code">
+              <rank>200</rank>
+            </item>
+            <item id="user_satisfaction">
+              <rank>210</rank>
+            </item>
+            <item id="sla_tto_passed">
+              <rank>220</rank>
+            </item>
+            <item id="sla_ttr_passed">
+              <rank>230</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>title</item>
-            <item>org_id</item>
-            <item>caller_id</item>
-            <item>start_date</item>
-            <item>status</item>
-            <item>agent_id</item>
+            <item id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="caller_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="agent_id">
+              <rank>60</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -1774,20 +1925,20 @@
     <menu id="Incident:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
       <rank>3</rank>
       <parent>IncidentManagement</parent>
-      <template_file></template_file>
+      <template_file/>
     </menu>
     <menu id="Incident:MyIncidents" xsi:type="OQLMenuNode" _delta="define">
       <rank>0</rank>
       <parent>Incident:Shortcuts</parent>
       <oql><![CDATA[SELECT Incident WHERE agent_id = :current_contact_id AND status NOT IN ("closed","resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="Incident:EscalatedIncidents" xsi:type="OQLMenuNode" _delta="define">
       <rank>1</rank>
       <parent>Incident:Shortcuts</parent>
       <oql><![CDATA[SELECT Incident WHERE status IN ("escalated_tto", "escalated_ttr") OR escalation_flag="yes"]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="Incident:OpenIncidents" xsi:type="OQLMenuNode" _delta="define">

+ 197 - 87
datamodels/2.x/itop-knownerror-mgmt/datamodel.itop-knownerror-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="KnownError" _delta="define">
       <parent>cmdbAbstractObject</parent>
@@ -12,14 +12,14 @@
         <key_type>autoincrement</key_type>
         <db_table>knownerror</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="name"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/known-error.png</icon>
         <reconciliation>
           <attributes>
@@ -31,7 +31,7 @@
       <fields>
         <field id="name" xsi:type="AttributeString">
           <sql>name</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="org_id" xsi:type="AttributeExternalKey">
@@ -56,27 +56,27 @@
         </field>
         <field id="symptom" xsi:type="AttributeText">
           <sql>symptom</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="root_cause" xsi:type="AttributeText">
           <sql>rootcause</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="workaround" xsi:type="AttributeText">
           <sql>workaround</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="solution" xsi:type="AttributeText">
           <sql>solution</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="error_code" xsi:type="AttributeString">
           <sql>error_code</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="domain" xsi:type="AttributeEnum">
@@ -93,17 +93,17 @@
         </field>
         <field id="vendor" xsi:type="AttributeString">
           <sql>vendor</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="model" xsi:type="AttributeString">
           <sql>model</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="version" xsi:type="AttributeString">
           <sql>version</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="ci_list" xsi:type="AttributeLinkedSetIndirect">
@@ -112,7 +112,7 @@
           <count_min>0</count_min>
           <count_max>0</count_max>
           <ext_key_to_remote>functionalci_id</ext_key_to_remote>
-          <duplicates></duplicates>
+          <duplicates/>
         </field>
         <field id="document_list" xsi:type="AttributeLinkedSetIndirect">
           <linked_class>lnkDocumentToError</linked_class>
@@ -120,45 +120,93 @@
           <count_min>0</count_min>
           <count_max>0</count_max>
           <ext_key_to_remote>document_id</ext_key_to_remote>
-          <duplicates></duplicates>
+          <duplicates/>
         </field>
       </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>
+            <item id="name">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="problem_id">
+              <rank>30</rank>
+            </item>
+            <item id="error_code">
+              <rank>40</rank>
+            </item>
+            <item id="domain">
+              <rank>50</rank>
+            </item>
+            <item id="vendor">
+              <rank>60</rank>
+            </item>
+            <item id="model">
+              <rank>70</rank>
+            </item>
+            <item id="version">
+              <rank>80</rank>
+            </item>
+            <item id="symptom">
+              <rank>90</rank>
+            </item>
+            <item id="root_cause">
+              <rank>100</rank>
+            </item>
+            <item id="workaround">
+              <rank>110</rank>
+            </item>
+            <item id="solution">
+              <rank>120</rank>
+            </item>
+            <item id="ci_list">
+              <rank>130</rank>
+            </item>
+            <item id="document_list">
+              <rank>140</rank>
+            </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>
+            <item id="name">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="problem_id">
+              <rank>30</rank>
+            </item>
+            <item id="error_code">
+              <rank>40</rank>
+            </item>
+            <item id="domain">
+              <rank>50</rank>
+            </item>
+            <item id="symptom">
+              <rank>60</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>org_id</item>
-            <item>problem_id</item>
-            <item>error_code</item>
-            <item>symptom</item>
+            <item id="org_id">
+              <rank>10</rank>
+            </item>
+            <item id="problem_id">
+              <rank>20</rank>
+            </item>
+            <item id="error_code">
+              <rank>30</rank>
+            </item>
+            <item id="symptom">
+              <rank>40</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -175,13 +223,13 @@
         <key_type>autoincrement</key_type>
         <db_table>lnkerrortofunctionalci</db_table>
         <db_key_field>link_id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>lnkErrorToFunctionalCI</format>
           <attributes/>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="functionalci_id"/>
@@ -212,7 +260,7 @@
         </field>
         <field id="reason" xsi:type="AttributeString">
           <sql>dummy</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -220,22 +268,38 @@
       <presentation>
         <details>
           <items>
-            <item>functionalci_id</item>
-            <item>error_id</item>
-            <item>reason</item>
+            <item id="functionalci_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_id">
+              <rank>20</rank>
+            </item>
+            <item id="reason">
+              <rank>30</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>functionalci_id</item>
-            <item>error_id</item>
+            <item id="functionalci_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_id">
+              <rank>20</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>functionalci_id</item>
-            <item>error_id</item>
-            <item>reason</item>
+            <item id="functionalci_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_id">
+              <rank>20</rank>
+            </item>
+            <item id="reason">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -252,7 +316,7 @@
         <key_type>autoincrement</key_type>
         <db_table>lnkdocumenttoerror</db_table>
         <db_key_field>link_id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
@@ -260,7 +324,7 @@
           </attributes>
         </naming>
         <display_template>../business/templates/default.html</display_template>
-        <icon></icon>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="document_id"/>
@@ -291,7 +355,7 @@
         </field>
         <field id="link_type" xsi:type="AttributeString">
           <sql>link_type</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -299,16 +363,28 @@
       <presentation>
         <details>
           <items>
-            <item>document_id</item>
-            <item>error_name</item>
-            <item>link_type</item>
+            <item id="document_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_name">
+              <rank>20</rank>
+            </item>
+            <item id="link_type">
+              <rank>30</rank>
+            </item>
           </items>
         </details>
         <list>
           <items>
-            <item>document_id</item>
-            <item>error_name</item>
-            <item>link_type</item>
+            <item id="document_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_name">
+              <rank>20</rank>
+            </item>
+            <item id="link_type">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -321,14 +397,14 @@
         <key_type>autoincrement</key_type>
         <db_table>faq</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="title"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/faq.png</icon>
         <reconciliation>
           <attributes>
@@ -339,17 +415,17 @@
       <fields>
         <field id="title" xsi:type="AttributeString">
           <sql>title</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="summary" xsi:type="AttributeText">
           <sql>summary</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="description" xsi:type="AttributeHTML">
           <sql>description</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="category_id" xsi:type="AttributeExternalKey">
@@ -364,12 +440,12 @@
         </field>
         <field id="error_code" xsi:type="AttributeString">
           <sql>error_code</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="key_words" xsi:type="AttributeString">
           <sql>key_words</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -377,28 +453,56 @@
       <presentation>
         <details>
           <items>
-            <item>category_id</item>
-            <item>title</item>
-            <item>error_code</item>
-            <item>key_words</item>
-            <item>summary</item>
-            <item>description</item>
+            <item id="category_id">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="error_code">
+              <rank>30</rank>
+            </item>
+            <item id="key_words">
+              <rank>40</rank>
+            </item>
+            <item id="summary">
+              <rank>50</rank>
+            </item>
+            <item id="description">
+              <rank>60</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>category_id</item>
-            <item>title</item>
-            <item>summary</item>
-            <item>error_code</item>
-            <item>key_words</item>
+            <item id="category_id">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="summary">
+              <rank>30</rank>
+            </item>
+            <item id="error_code">
+              <rank>40</rank>
+            </item>
+            <item id="key_words">
+              <rank>50</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>category_id</item>
-            <item>error_code</item>
-            <item>key_words</item>
+            <item id="category_id">
+              <rank>10</rank>
+            </item>
+            <item id="error_code">
+              <rank>20</rank>
+            </item>
+            <item id="key_words">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -411,15 +515,15 @@
         <key_type>autoincrement</key_type>
         <db_table>faqcategory</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="name"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="name"/>
@@ -429,7 +533,7 @@
       <fields>
         <field id="name" xsi:type="AttributeString">
           <sql>nam</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="faq_list" xsi:type="AttributeLinkedSet">
@@ -444,13 +548,19 @@
       <presentation>
         <details>
           <items>
-            <item>name</item>
-            <item>faq_list</item>
+            <item id="name">
+              <rank>10</rank>
+            </item>
+            <item id="faq_list">
+              <rank>20</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>name</item>
+            <item id="name">
+              <rank>10</rank>
+            </item>
           </items>
         </search>
       </presentation>

+ 153 - 54
datamodels/2.x/itop-problem-mgmt/datamodel.itop-problem-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Problem" _delta="define">
       <parent>Ticket</parent>
@@ -15,14 +15,14 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_problem</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/problem.png</icon>
         <reconciliation>
           <attributes>
@@ -73,7 +73,7 @@
         </field>
         <field id="product" xsi:type="AttributeString">
           <sql>product</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="impact" xsi:type="AttributeEnum">
@@ -124,12 +124,12 @@
         </field>
         <field id="assignment_date" xsi:type="AttributeDateTime">
           <sql>assignment_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_date" xsi:type="AttributeDateTime">
           <sql>resolution_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="knownerrors_list" xsi:type="AttributeLinkedSet">
@@ -535,55 +535,112 @@
       <presentation>
         <details>
           <items>
-            <item>functionalcis_list</item>
-            <item>contacts_list</item>
-            <item>knownerrors_list</item>
-            <item>workorders_list</item>
-            <item>related_request_list</item>
+            <item id="functionalcis_list">
+              <rank>10</rank>
+            </item>
+            <item id="contacts_list">
+              <rank>20</rank>
+            </item>
+            <item id="knownerrors_list">
+              <rank>30</rank>
+            </item>
+            <item id="workorders_list">
+              <rank>40</rank>
+            </item>
+            <item id="related_request_list">
+              <rank>50</rank>
+            </item>
             <item id="col:col1">
+              <rank>60</rank>
               <items>
                 <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
                   <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>
+                    <item id="ref">
+                      <rank>10</rank>
+                    </item>
+                    <item id="title">
+                      <rank>20</rank>
+                    </item>
+                    <item id="org_id">
+                      <rank>30</rank>
+                    </item>
+                    <item id="status">
+                      <rank>40</rank>
+                    </item>
+                    <item id="priority">
+                      <rank>50</rank>
+                    </item>
+                    <item id="service_id">
+                      <rank>60</rank>
+                    </item>
+                    <item id="servicesubcategory_id">
+                      <rank>70</rank>
+                    </item>
+                    <item id="product">
+                      <rank>80</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:moreinfo">
+                  <rank>20</rank>
                   <items>
-                    <item>impact</item>
-                    <item>emergency</item>
-                    <item>description</item>
+                    <item id="impact">
+                      <rank>10</rank>
+                    </item>
+                    <item id="emergency">
+                      <rank>20</rank>
+                    </item>
+                    <item id="description">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col2">
+              <rank>70</rank>
               <items>
                 <item id="fieldset:Ticket:date">
+                  <rank>10</rank>
                   <items>
-                    <item>start_date</item>
-                    <item>last_update</item>
-                    <item>assignment_date</item>
-                    <item>resolution_date</item>
-                    <item>close_date</item>
+                    <item id="start_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>20</rank>
+                    </item>
+                    <item id="assignment_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="resolution_date">
+                      <rank>40</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>50</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
                   <items>
-                    <item>caller_id</item>
-                    <item>team_id</item>
-                    <item>agent_id</item>
+                    <item id="caller_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="team_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:relation">
+                  <rank>30</rank>
                   <items>
-                    <item>related_change_id</item>
+                    <item id="related_change_id">
+                      <rank>10</rank>
+                    </item>
                   </items>
                 </item>
               </items>
@@ -592,31 +649,73 @@
         </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>emergency</item>
-            <item>priority</item>
-            <item>caller_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>close_date</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="org_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="service_id">
+              <rank>60</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>70</rank>
+            </item>
+            <item id="product">
+              <rank>80</rank>
+            </item>
+            <item id="impact">
+              <rank>90</rank>
+            </item>
+            <item id="emergency">
+              <rank>100</rank>
+            </item>
+            <item id="priority">
+              <rank>110</rank>
+            </item>
+            <item id="caller_id">
+              <rank>120</rank>
+            </item>
+            <item id="team_id">
+              <rank>130</rank>
+            </item>
+            <item id="agent_id">
+              <rank>140</rank>
+            </item>
+            <item id="close_date">
+              <rank>150</rank>
+            </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 id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="start_date">
+              <rank>30</rank>
+            </item>
+            <item id="status">
+              <rank>40</rank>
+            </item>
+            <item id="service_id">
+              <rank>50</rank>
+            </item>
+            <item id="priority">
+              <rank>60</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -629,7 +728,7 @@
     <menu id="Problem:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
       <rank>5</rank>
       <parent>ProblemManagement</parent>
-      <template_file></template_file>
+      <template_file/>
     </menu>
     <menu id="Problem:Overview" xsi:type="DashboardMenuNode" _delta="define">
       <rank>0</rank>
@@ -650,7 +749,7 @@
       <rank>1</rank>
       <parent>Problem:Shortcuts</parent>
       <oql><![CDATA[SELECT Problem WHERE agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
     </menu>
     <menu id="Problem:OpenProblems" xsi:type="OQLMenuNode" _delta="define">
       <rank>2</rank>

+ 1 - 1
datamodels/2.x/itop-profiles-itil/datamodel.itop-profiles-itil.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes/>
   <user_rights>
     <groups>

+ 289 - 132
datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="UserRequest" _delta="define">
       <parent>Ticket</parent>
@@ -15,14 +15,14 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_request</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/user-request.png</icon>
         <reconciliation>
           <attributes>
@@ -138,7 +138,7 @@
           <target_class>ServiceSubcategory</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="servicesubcategory_name" xsi:type="AttributeExternalField">
           <extkey_attcode>servicesubcategory_id</extkey_attcode>
@@ -156,57 +156,57 @@
         </field>
         <field id="escalation_reason" xsi:type="AttributeString">
           <sql>escalation_reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="assignment_date" xsi:type="AttributeDateTime">
           <sql>assignment_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_date" xsi:type="AttributeDateTime">
           <sql>resolution_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="last_pending_date" xsi:type="AttributeDateTime">
           <sql>last_pending_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="cumulatedpending" xsi:type="AttributeStopWatch">
           <states>
             <state id="pending"/>
           </states>
-          <working_time></working_time>
-	   <thresholds/>
-          <goal></goal>
+          <working_time/>
+          <thresholds/>
+          <goal/>
         </field>
         <field id="tto" xsi:type="AttributeStopWatch">
           <states>
             <state id="new"/>
             <state id="escalated_tto"/>
           </states>
-          <working_time></working_time>
+          <working_time/>
           <goal>ResponseTicketTTO</goal>
           <thresholds>
             <threshold>
-            	<percent>75</percent>
-            	<actions>
+              <percent>75</percent>
+              <actions>
 		</actions>
             </threshold>
             <threshold>
-            	<percent>100</percent>
-            	<actions>
-            	  <action>
-            	    <verb>ApplyStimulus</verb>
-            	    <params>
-            	      <param>ev_timeout</param>
-            	    </params>
-            	  </action>
-		</actions>
+              <percent>100</percent>
+              <actions>
+                <action>
+                  <verb>ApplyStimulus</verb>
+                  <params>
+                    <param>ev_timeout</param>
+                  </params>
+                </action>
+              </actions>
             </threshold>
-	   </thresholds>
+          </thresholds>
         </field>
         <field id="ttr" xsi:type="AttributeStopWatch">
           <states>
@@ -216,54 +216,54 @@
             <state id="approved"/>
             <state id="escalated_ttr"/>
           </states>
-          <working_time></working_time>
+          <working_time/>
           <goal>ResponseTicketTTR</goal>
           <thresholds>
             <threshold>
-            	<percent>75</percent>
-            	<actions>
+              <percent>75</percent>
+              <actions>
 		</actions>
             </threshold>
             <threshold>
-            	<percent>100</percent>
-            	<actions>
-            	  <action>
-            	    <verb>ApplyStimulus</verb>
-            	    <params>
-            	      <param>ev_timeout</param>
-            	    </params>
-            	  </action>
-		</actions>
+              <percent>100</percent>
+              <actions>
+                <action>
+                  <verb>ApplyStimulus</verb>
+                  <params>
+                    <param>ev_timeout</param>
+                  </params>
+                </action>
+              </actions>
             </threshold>
-	  </thresholds>
+          </thresholds>
         </field>
         <field id="tto_escalation_deadline" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_deadline</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_deadline</item_code>
         </field>
         <field id="sla_tto_passed" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_passed</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_passed</item_code>
         </field>
         <field id="sla_tto_over" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_overrun</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_overrun</item_code>
         </field>
         <field id="ttr_escalation_deadline" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_deadline</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_deadline</item_code>
         </field>
         <field id="sla_ttr_passed" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_passed</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_passed</item_code>
         </field>
         <field id="sla_ttr_over" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_overrun</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_overrun</item_code>
         </field>
         <field id="time_spent" xsi:type="AttributeDuration">
           <sql>time_spent</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_code" xsi:type="AttributeEnum">
@@ -282,12 +282,12 @@
         </field>
         <field id="solution" xsi:type="AttributeText">
           <sql>solution</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="pending_reason" xsi:type="AttributeText">
           <sql>pending_reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="parent_request_id" xsi:type="AttributeExternalKey">
@@ -346,7 +346,7 @@
         </field>
         <field id="public_log" xsi:type="AttributeCaseLog">
           <sql>public_log</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="user_satisfaction" xsi:type="AttributeEnum">
@@ -362,7 +362,7 @@
         </field>
         <field id="user_comment" xsi:type="AttributeText">
           <sql>user_commment</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -1211,7 +1211,7 @@
               <attribute id="org_id">
                 <read_only/>
               </attribute>
-                <attribute id="caller_id">
+              <attribute id="caller_id">
                 <read_only/>
               </attribute>
               <attribute id="origin">
@@ -1934,89 +1934,186 @@
       <presentation>
         <details>
           <items>
-            <item>functionalcis_list</item>
-            <item>contacts_list</item>
-            <item>related_request_list</item>
-            <item>workorders_list</item>
+            <item id="functionalcis_list">
+              <rank>10</rank>
+            </item>
+            <item id="contacts_list">
+              <rank>20</rank>
+            </item>
+            <item id="related_request_list">
+              <rank>30</rank>
+            </item>
+            <item id="workorders_list">
+              <rank>40</rank>
+            </item>
             <item id="col:col1">
+              <rank>50</rank>
               <items>
                 <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
                   <items>
-                    <item>org_id</item>
-                    <item>caller_id</item>
-                    <item>status</item>
-                    <item>origin</item>
-                    <item>title</item>
-                    <item>description</item>
+                    <item id="org_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="caller_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="status">
+                      <rank>30</rank>
+                    </item>
+                    <item id="origin">
+                      <rank>40</rank>
+                    </item>
+                    <item id="title">
+                      <rank>50</rank>
+                    </item>
+                    <item id="description">
+                      <rank>60</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:moreinfo">
+                  <rank>20</rank>
                   <items>
-                    <item>service_id</item>
-                    <item>servicesubcategory_id</item>
-                    <item>escalation_flag</item>
-                    <item>escalation_reason</item>
-                    <item>pending_reason</item>
+                    <item id="service_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="servicesubcategory_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="escalation_flag">
+                      <rank>30</rank>
+                    </item>
+                    <item id="escalation_reason">
+                      <rank>40</rank>
+                    </item>
+                    <item id="pending_reason">
+                      <rank>50</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col2">
+              <rank>60</rank>
               <items>
                 <item id="fieldset:Ticket:Type">
+                  <rank>10</rank>
                   <items>
-                    <item>request_type</item>
-                    <item>impact</item>
-                    <item>emergency</item>
-                    <item>priority</item>
+                    <item id="request_type">
+                      <rank>10</rank>
+                    </item>
+                    <item id="impact">
+                      <rank>20</rank>
+                    </item>
+                    <item id="emergency">
+                      <rank>30</rank>
+                    </item>
+                    <item id="priority">
+                      <rank>40</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
                   <items>
-                    <item>team_id</item>
-                    <item>agent_id</item>
-                    <item>approver_id</item>
+                    <item id="team_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="approver_id">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:date">
+                  <rank>30</rank>
                   <items>
-                    <item>start_date</item>
-                    <item>last_update</item>
-                    <item>assignment_date</item>
-                    <item>tto_escalation_deadline</item>
-                    <item>ttr_escalation_deadline</item>
-                    <item>last_pending_date</item>
-                    <item>resolution_date</item>
-                    <item>close_date</item>
+                    <item id="start_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>20</rank>
+                    </item>
+                    <item id="assignment_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="tto_escalation_deadline">
+                      <rank>40</rank>
+                    </item>
+                    <item id="ttr_escalation_deadline">
+                      <rank>50</rank>
+                    </item>
+                    <item id="last_pending_date">
+                      <rank>60</rank>
+                    </item>
+                    <item id="resolution_date">
+                      <rank>70</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>80</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col3">
+              <rank>70</rank>
               <items>
                 <item id="fieldset:Relations">
+                  <rank>10</rank>
                   <items>
-                    <item>parent_request_id</item>
-                    <item>parent_incident_id</item>
-                    <item>parent_problem_id</item>
-                    <item>parent_change_id</item>
+                    <item id="parent_request_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="parent_incident_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="parent_problem_id">
+                      <rank>30</rank>
+                    </item>
+                    <item id="parent_change_id">
+                      <rank>40</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:resolution">
+                  <rank>20</rank>
                   <items>
-                    <item>resolution_code</item>
-                    <item>solution</item>
-                    <item>time_spent</item>
-                    <item>user_satisfaction</item>
-                    <item>user_comment</item>
+                    <item id="resolution_code">
+                      <rank>10</rank>
+                    </item>
+                    <item id="solution">
+                      <rank>20</rank>
+                    </item>
+                    <item id="time_spent">
+                      <rank>30</rank>
+                    </item>
+                    <item id="user_satisfaction">
+                      <rank>40</rank>
+                    </item>
+                    <item id="user_comment">
+                      <rank>50</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:SLA">
+                  <rank>30</rank>
                   <items>
-		   <item>sla_tto_passed</item>
-		   <item>sla_tto_over</item>
-		   <item>sla_ttr_passed</item>
-		   <item>sla_ttr_over</item>
+                    <item id="sla_tto_passed">
+                      <rank>10</rank>
+                    </item>
+                    <item id="sla_tto_over">
+                      <rank>20</rank>
+                    </item>
+                    <item id="sla_ttr_passed">
+                      <rank>30</rank>
+                    </item>
+                    <item id="sla_ttr_over">
+                      <rank>40</rank>
+                    </item>
                   </items>
                 </item>
               </items>
@@ -2025,40 +2122,100 @@
         </details>
         <search>
           <items>
-            <item>ref</item>
-            <item>org_id</item>
-            <item>title</item>
-            <item>description</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>resolution_date</item>
-            <item>close_date</item>
-            <item>status</item>
-            <item>caller_id</item>
-            <item>origin</item>
-            <item>request_type</item>
-            <item>impact</item>
-            <item>emergency</item>
-            <item>priority</item>
-            <item>service_id</item>
-            <item>servicesubcategory_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>escalation_flag</item>
-            <item>resolution_code</item>
-            <item>user_satisfaction</item>
-	    <item>sla_tto_passed</item>
-	    <item>sla_ttr_passed</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="title">
+              <rank>30</rank>
+            </item>
+            <item id="description">
+              <rank>40</rank>
+            </item>
+            <item id="start_date">
+              <rank>50</rank>
+            </item>
+            <item id="end_date">
+              <rank>60</rank>
+            </item>
+            <item id="resolution_date">
+              <rank>70</rank>
+            </item>
+            <item id="close_date">
+              <rank>80</rank>
+            </item>
+            <item id="status">
+              <rank>90</rank>
+            </item>
+            <item id="caller_id">
+              <rank>100</rank>
+            </item>
+            <item id="origin">
+              <rank>110</rank>
+            </item>
+            <item id="request_type">
+              <rank>120</rank>
+            </item>
+            <item id="impact">
+              <rank>130</rank>
+            </item>
+            <item id="emergency">
+              <rank>140</rank>
+            </item>
+            <item id="priority">
+              <rank>150</rank>
+            </item>
+            <item id="service_id">
+              <rank>160</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>170</rank>
+            </item>
+            <item id="team_id">
+              <rank>180</rank>
+            </item>
+            <item id="agent_id">
+              <rank>190</rank>
+            </item>
+            <item id="escalation_flag">
+              <rank>200</rank>
+            </item>
+            <item id="resolution_code">
+              <rank>210</rank>
+            </item>
+            <item id="user_satisfaction">
+              <rank>220</rank>
+            </item>
+            <item id="sla_tto_passed">
+              <rank>230</rank>
+            </item>
+            <item id="sla_ttr_passed">
+              <rank>240</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>title</item>
-            <item>org_id</item>
-            <item>caller_id</item>
-            <item>start_date</item>
-            <item>status</item>
-            <item>agent_id</item>
+            <item id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="caller_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="agent_id">
+              <rank>60</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -2090,20 +2247,20 @@
     <menu id="UserRequest:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
       <rank>3</rank>
       <parent>RequestManagement</parent>
-      <template_file></template_file>
+      <template_file/>
     </menu>
     <menu id="UserRequest:MyRequests" xsi:type="OQLMenuNode" _delta="define">
       <rank>0</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE agent_id = :current_contact_id AND status NOT IN ("closed","resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="UserRequest:EscalatedRequests" xsi:type="OQLMenuNode" _delta="define">
       <rank>1</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE status IN ("escalated_tto", "escalated_ttr") OR escalation_flag="yes"]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="define">
@@ -2117,7 +2274,7 @@
       <rank>3</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE caller_id = :current_contact_id AND status NOT IN ("closed")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
   </menus>

+ 293 - 139
datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="UserRequest" _delta="define">
       <parent>Ticket</parent>
@@ -15,14 +15,14 @@
         <key_type>autoincrement</key_type>
         <db_table>ticket_request</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
+        <display_template/>
         <icon>images/user-request.png</icon>
         <reconciliation>
           <attributes>
@@ -111,7 +111,7 @@
           <target_class>Person</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="approver_email" xsi:type="AttributeExternalField">
           <extkey_attcode>approver_id</extkey_attcode>
@@ -127,7 +127,7 @@
           <target_class>Service</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="service_name" xsi:type="AttributeExternalField">
           <extkey_attcode>service_id</extkey_attcode>
@@ -144,7 +144,7 @@
           <target_class>ServiceSubcategory</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="servicesubcategory_name" xsi:type="AttributeExternalField">
           <extkey_attcode>servicesubcategory_id</extkey_attcode>
@@ -162,57 +162,57 @@
         </field>
         <field id="escalation_reason" xsi:type="AttributeString">
           <sql>escalation_reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="assignment_date" xsi:type="AttributeDateTime">
           <sql>assignment_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_date" xsi:type="AttributeDateTime">
           <sql>resolution_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="last_pending_date" xsi:type="AttributeDateTime">
           <sql>last_pending_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="cumulatedpending" xsi:type="AttributeStopWatch">
           <states>
             <state id="pending"/>
           </states>
-          <working_time></working_time>
-	   <thresholds/>
-          <goal></goal>
+          <working_time/>
+          <thresholds/>
+          <goal/>
         </field>
         <field id="tto" xsi:type="AttributeStopWatch">
           <states>
             <state id="new"/>
             <state id="escalated_tto"/>
           </states>
-          <working_time></working_time>
+          <working_time/>
           <goal>ResponseTicketTTO</goal>
           <thresholds>
             <threshold>
-            	<percent>75</percent>
-            	<actions>
+              <percent>75</percent>
+              <actions>
 		</actions>
             </threshold>
             <threshold>
-            	<percent>100</percent>
-            	<actions>
-            	  <action>
-            	    <verb>ApplyStimulus</verb>
-            	    <params>
-            	      <param>ev_timeout</param>
-            	    </params>
-            	  </action>
-		</actions>
+              <percent>100</percent>
+              <actions>
+                <action>
+                  <verb>ApplyStimulus</verb>
+                  <params>
+                    <param>ev_timeout</param>
+                  </params>
+                </action>
+              </actions>
             </threshold>
-	   </thresholds>
+          </thresholds>
         </field>
         <field id="ttr" xsi:type="AttributeStopWatch">
           <states>
@@ -222,55 +222,54 @@
             <state id="approved"/>
             <state id="escalated_ttr"/>
           </states>
-          <working_time></working_time>
+          <working_time/>
           <goal>ResponseTicketTTR</goal>
           <thresholds>
             <threshold>
-            	<percent>75</percent>
-            	<actions>
+              <percent>75</percent>
+              <actions>
 		</actions>
             </threshold>
             <threshold>
-            	<percent>100</percent>
-            	<actions>
-            	  <action>
-            	    <verb>ApplyStimulus</verb>
-            	    <params>
-            	      <param>ev_timeout</param>
-            	    </params>
-            	  </action>
-		</actions>
+              <percent>100</percent>
+              <actions>
+                <action>
+                  <verb>ApplyStimulus</verb>
+                  <params>
+                    <param>ev_timeout</param>
+                  </params>
+                </action>
+              </actions>
             </threshold>
-	  </thresholds>
+          </thresholds>
         </field>
         <field id="tto_escalation_deadline" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_deadline</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_deadline</item_code>
         </field>
         <field id="sla_tto_passed" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_passed</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_passed</item_code>
         </field>
         <field id="sla_tto_over" xsi:type="AttributeSubItem">
-			<target_attcode>tto</target_attcode>
-			<item_code>100_overrun</item_code>
+          <target_attcode>tto</target_attcode>
+          <item_code>100_overrun</item_code>
         </field>
         <field id="ttr_escalation_deadline" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_deadline</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_deadline</item_code>
         </field>
         <field id="sla_ttr_passed" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_passed</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_passed</item_code>
         </field>
         <field id="sla_ttr_over" xsi:type="AttributeSubItem">
-			<target_attcode>ttr</target_attcode>
-			<item_code>100_overrun</item_code>
+          <target_attcode>ttr</target_attcode>
+          <item_code>100_overrun</item_code>
         </field>
-
         <field id="time_spent" xsi:type="AttributeDuration">
           <sql>time_spent</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="resolution_code" xsi:type="AttributeEnum">
@@ -289,12 +288,12 @@
         </field>
         <field id="solution" xsi:type="AttributeText">
           <sql>solution</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="pending_reason" xsi:type="AttributeText">
           <sql>pending_reason</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="parent_request_id" xsi:type="AttributeExternalKey">
@@ -306,7 +305,7 @@
           <target_class>UserRequest</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="parent_request_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>parent_request_id</extkey_attcode>
@@ -314,12 +313,12 @@
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="parent_problem_id" xsi:type="AttributeExternalKey">
-         <filter><![CDATA[SELECT Problem WHERE status != "closed"]]></filter>
+          <filter><![CDATA[SELECT Problem WHERE status != "closed"]]></filter>
           <sql>parent_problem_id</sql>
           <target_class>Problem</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="parent_problem_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>parent_problem_id</extkey_attcode>
@@ -327,12 +326,12 @@
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="parent_change_id" xsi:type="AttributeExternalKey">
-         <filter><![CDATA[SELECT Change WHERE status != "closed"]]></filter>
+          <filter><![CDATA[SELECT Change WHERE status != "closed"]]></filter>
           <sql>parent_change_id</sql>
           <target_class>Change</target_class>
           <is_null_allowed>true</is_null_allowed>
           <on_target_delete>DEL_MANUAL</on_target_delete>
-          <jointype></jointype>
+          <jointype/>
         </field>
         <field id="parent_change_ref" xsi:type="AttributeExternalField">
           <extkey_attcode>parent_change_id</extkey_attcode>
@@ -348,7 +347,7 @@
         </field>
         <field id="public_log" xsi:type="AttributeCaseLog">
           <sql>public_log</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="user_satisfaction" xsi:type="AttributeEnum">
@@ -364,7 +363,7 @@
         </field>
         <field id="user_comment" xsi:type="AttributeText">
           <sql>user_commment</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -1198,7 +1197,7 @@
               <attribute id="org_id">
                 <read_only/>
               </attribute>
-                <attribute id="caller_id">
+              <attribute id="caller_id">
                 <read_only/>
               </attribute>
               <attribute id="origin">
@@ -1920,88 +1919,183 @@
       <presentation>
         <details>
           <items>
-            <item>functionalcis_list</item>
-            <item>contacts_list</item>
-            <item>related_request_list</item>
-            <item>workorders_list</item>
+            <item id="functionalcis_list">
+              <rank>10</rank>
+            </item>
+            <item id="contacts_list">
+              <rank>20</rank>
+            </item>
+            <item id="related_request_list">
+              <rank>30</rank>
+            </item>
+            <item id="workorders_list">
+              <rank>40</rank>
+            </item>
             <item id="col:col1">
+              <rank>50</rank>
               <items>
                 <item id="fieldset:Ticket:baseinfo">
+                  <rank>10</rank>
                   <items>
-                    <item>org_id</item>
-                    <item>caller_id</item>
-                    <item>status</item>
-                    <item>origin</item>
-                    <item>title</item>
-                    <item>description</item>
+                    <item id="org_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="caller_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="status">
+                      <rank>30</rank>
+                    </item>
+                    <item id="origin">
+                      <rank>40</rank>
+                    </item>
+                    <item id="title">
+                      <rank>50</rank>
+                    </item>
+                    <item id="description">
+                      <rank>60</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:moreinfo">
+                  <rank>20</rank>
                   <items>
-                    <item>service_id</item>
-                    <item>servicesubcategory_id</item>
-                    <item>escalation_flag</item>
-                    <item>escalation_reason</item>
-                    <item>pending_reason</item>
+                    <item id="service_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="servicesubcategory_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="escalation_flag">
+                      <rank>30</rank>
+                    </item>
+                    <item id="escalation_reason">
+                      <rank>40</rank>
+                    </item>
+                    <item id="pending_reason">
+                      <rank>50</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col2">
+              <rank>60</rank>
               <items>
                 <item id="fieldset:Ticket:Type">
+                  <rank>10</rank>
                   <items>
-                    <item>request_type</item>
-                    <item>impact</item>
-                    <item>emergency</item>
-                    <item>priority</item>
+                    <item id="request_type">
+                      <rank>10</rank>
+                    </item>
+                    <item id="impact">
+                      <rank>20</rank>
+                    </item>
+                    <item id="emergency">
+                      <rank>30</rank>
+                    </item>
+                    <item id="priority">
+                      <rank>40</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:contact">
+                  <rank>20</rank>
                   <items>
-                    <item>team_id</item>
-                    <item>agent_id</item>
-                    <item>approver_id</item>
+                    <item id="team_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="agent_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="approver_id">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:date">
+                  <rank>30</rank>
                   <items>
-                    <item>start_date</item>
-                    <item>last_update</item>
-                    <item>assignment_date</item>
-                    <item>tto_escalation_deadline</item>
-                    <item>ttr_escalation_deadline</item>
-                    <item>last_pending_date</item>
-                    <item>resolution_date</item>
-                    <item>close_date</item>
+                    <item id="start_date">
+                      <rank>10</rank>
+                    </item>
+                    <item id="last_update">
+                      <rank>20</rank>
+                    </item>
+                    <item id="assignment_date">
+                      <rank>30</rank>
+                    </item>
+                    <item id="tto_escalation_deadline">
+                      <rank>40</rank>
+                    </item>
+                    <item id="ttr_escalation_deadline">
+                      <rank>50</rank>
+                    </item>
+                    <item id="last_pending_date">
+                      <rank>60</rank>
+                    </item>
+                    <item id="resolution_date">
+                      <rank>70</rank>
+                    </item>
+                    <item id="close_date">
+                      <rank>80</rank>
+                    </item>
                   </items>
                 </item>
               </items>
             </item>
             <item id="col:col3">
+              <rank>70</rank>
               <items>
                 <item id="fieldset:Relations">
+                  <rank>10</rank>
                   <items>
-                    <item>parent_request_id</item>
-                    <item>parent_problem_id</item>
-                    <item>parent_change_id</item>
+                    <item id="parent_request_id">
+                      <rank>10</rank>
+                    </item>
+                    <item id="parent_problem_id">
+                      <rank>20</rank>
+                    </item>
+                    <item id="parent_change_id">
+                      <rank>30</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:resolution">
+                  <rank>20</rank>
                   <items>
-                    <item>resolution_code</item>
-                    <item>solution</item>
-                    <item>time_spent</item>
-                    <item>user_satisfaction</item>
-                    <item>user_comment</item>
+                    <item id="resolution_code">
+                      <rank>10</rank>
+                    </item>
+                    <item id="solution">
+                      <rank>20</rank>
+                    </item>
+                    <item id="time_spent">
+                      <rank>30</rank>
+                    </item>
+                    <item id="user_satisfaction">
+                      <rank>40</rank>
+                    </item>
+                    <item id="user_comment">
+                      <rank>50</rank>
+                    </item>
                   </items>
                 </item>
                 <item id="fieldset:Ticket:SLA">
+                  <rank>30</rank>
                   <items>
-		   <item>sla_tto_passed</item>
-		   <item>sla_tto_over</item>
-		   <item>sla_ttr_passed</item>
-		   <item>sla_ttr_over</item>
+                    <item id="sla_tto_passed">
+                      <rank>10</rank>
+                    </item>
+                    <item id="sla_tto_over">
+                      <rank>20</rank>
+                    </item>
+                    <item id="sla_ttr_passed">
+                      <rank>30</rank>
+                    </item>
+                    <item id="sla_ttr_over">
+                      <rank>40</rank>
+                    </item>
                   </items>
                 </item>
               </items>
@@ -2010,40 +2104,100 @@
         </details>
         <search>
           <items>
-            <item>ref</item>
-            <item>org_id</item>
-            <item>title</item>
-            <item>description</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>resolution_date</item>
-            <item>close_date</item>
-            <item>status</item>
-            <item>caller_id</item>
-            <item>origin</item>
-            <item>request_type</item>
-            <item>impact</item>
-            <item>emergency</item>
-            <item>priority</item>
-            <item>service_id</item>
-            <item>servicesubcategory_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>escalation_flag</item>
-            <item>resolution_code</item>
-            <item>user_satisfaction</item>
-	    <item>sla_tto_passed</item>
-	    <item>sla_ttr_passed</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="title">
+              <rank>30</rank>
+            </item>
+            <item id="description">
+              <rank>40</rank>
+            </item>
+            <item id="start_date">
+              <rank>50</rank>
+            </item>
+            <item id="end_date">
+              <rank>60</rank>
+            </item>
+            <item id="resolution_date">
+              <rank>70</rank>
+            </item>
+            <item id="close_date">
+              <rank>80</rank>
+            </item>
+            <item id="status">
+              <rank>90</rank>
+            </item>
+            <item id="caller_id">
+              <rank>100</rank>
+            </item>
+            <item id="origin">
+              <rank>110</rank>
+            </item>
+            <item id="request_type">
+              <rank>120</rank>
+            </item>
+            <item id="impact">
+              <rank>130</rank>
+            </item>
+            <item id="emergency">
+              <rank>140</rank>
+            </item>
+            <item id="priority">
+              <rank>150</rank>
+            </item>
+            <item id="service_id">
+              <rank>160</rank>
+            </item>
+            <item id="servicesubcategory_id">
+              <rank>170</rank>
+            </item>
+            <item id="team_id">
+              <rank>180</rank>
+            </item>
+            <item id="agent_id">
+              <rank>190</rank>
+            </item>
+            <item id="escalation_flag">
+              <rank>200</rank>
+            </item>
+            <item id="resolution_code">
+              <rank>210</rank>
+            </item>
+            <item id="user_satisfaction">
+              <rank>220</rank>
+            </item>
+            <item id="sla_tto_passed">
+              <rank>230</rank>
+            </item>
+            <item id="sla_ttr_passed">
+              <rank>240</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>title</item>
-            <item>org_id</item>
-            <item>caller_id</item>
-            <item>start_date</item>
-            <item>status</item>
-            <item>agent_id</item>
+            <item id="title">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="caller_id">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="status">
+              <rank>50</rank>
+            </item>
+            <item id="agent_id">
+              <rank>60</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -2075,20 +2229,20 @@
     <menu id="UserRequest:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
       <rank>3</rank>
       <parent>RequestManagement</parent>
-      <template_file></template_file>
+      <template_file/>
     </menu>
     <menu id="UserRequest:MyRequests" xsi:type="OQLMenuNode" _delta="define">
       <rank>0</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE agent_id = :current_contact_id AND status NOT IN ("closed","resolved")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="UserRequest:EscalatedRequests" xsi:type="OQLMenuNode" _delta="define">
       <rank>1</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE status IN ("escalated_tto", "escalated_ttr") OR escalation_flag="yes"]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
     <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="define">
@@ -2102,7 +2256,7 @@
       <rank>3</rank>
       <parent>UserRequest:Shortcuts</parent>
       <oql><![CDATA[SELECT UserRequest WHERE caller_id = :current_contact_id AND status NOT IN ("closed")]]></oql>
-      <do_search></do_search>
+      <do_search/>
       <auto_reload>fast</auto_reload>
     </menu>
   </menus>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 443 - 179
datamodels/2.x/itop-service-mgmt-provider/datamodel.itop-service-mgmt-provider.xml


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 496 - 199
datamodels/2.x/itop-service-mgmt/datamodel.itop-service-mgmt.xml


+ 234 - 98
datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
   <classes>
     <class id="Ticket" _delta="define">
       <parent>cmdbAbstractObject</parent>
@@ -22,8 +22,8 @@
             <attribute id="ref"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ref"/>
@@ -33,7 +33,7 @@
       <fields>
         <field id="ref" xsi:type="AttributeString">
           <sql>ref</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="org_id" xsi:type="AttributeExternalKey">
@@ -90,37 +90,37 @@
         </field>
         <field id="title" xsi:type="AttributeString">
           <sql>title</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="description" xsi:type="AttributeText">
           <sql>description</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="start_date" xsi:type="AttributeDateTime">
           <sql>start_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="end_date" xsi:type="AttributeDateTime">
           <sql>end_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="last_update" xsi:type="AttributeDateTime">
           <sql>last_update</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="close_date" xsi:type="AttributeDateTime">
           <sql>close_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="private_log" xsi:type="AttributeCaseLog">
           <sql>private_log</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
         <field id="contacts_list" xsi:type="AttributeLinkedSetIndirect">
@@ -129,7 +129,7 @@
           <count_min>0</count_min>
           <count_max>0</count_max>
           <ext_key_to_remote>contact_id</ext_key_to_remote>
-          <duplicates></duplicates>
+          <duplicates/>
         </field>
         <field id="functionalcis_list" xsi:type="AttributeLinkedSetIndirect">
           <linked_class>lnkFunctionalCIToTicket</linked_class>
@@ -137,7 +137,7 @@
           <count_min>0</count_min>
           <count_max>0</count_max>
           <ext_key_to_remote>functionalci_id</ext_key_to_remote>
-          <duplicates></duplicates>
+          <duplicates/>
         </field>
         <field id="workorders_list" xsi:type="AttributeLinkedSet">
           <linked_class>WorkOrder</linked_class>
@@ -150,43 +150,101 @@
       <presentation>
         <details>
           <items>
-            <item>ref</item>
-            <item>org_id</item>
-            <item>caller_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>title</item>
-            <item>description</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>last_update</item>
-            <item>close_date</item>
-            <item>private_log</item>
-            <item>contacts_list</item>
-            <item>functionalcis_list</item>
-            <item>workorders_list</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="caller_id">
+              <rank>30</rank>
+            </item>
+            <item id="team_id">
+              <rank>40</rank>
+            </item>
+            <item id="agent_id">
+              <rank>50</rank>
+            </item>
+            <item id="title">
+              <rank>60</rank>
+            </item>
+            <item id="description">
+              <rank>70</rank>
+            </item>
+            <item id="start_date">
+              <rank>80</rank>
+            </item>
+            <item id="end_date">
+              <rank>90</rank>
+            </item>
+            <item id="last_update">
+              <rank>100</rank>
+            </item>
+            <item id="close_date">
+              <rank>110</rank>
+            </item>
+            <item id="private_log">
+              <rank>120</rank>
+            </item>
+            <item id="contacts_list">
+              <rank>130</rank>
+            </item>
+            <item id="functionalcis_list">
+              <rank>140</rank>
+            </item>
+            <item id="workorders_list">
+              <rank>150</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>ref</item>
-            <item>title</item>
-            <item>description</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>last_update</item>
-            <item>close_date</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="title">
+              <rank>20</rank>
+            </item>
+            <item id="description">
+              <rank>30</rank>
+            </item>
+            <item id="start_date">
+              <rank>40</rank>
+            </item>
+            <item id="end_date">
+              <rank>50</rank>
+            </item>
+            <item id="last_update">
+              <rank>60</rank>
+            </item>
+            <item id="close_date">
+              <rank>70</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>ref</item>
-            <item>org_id</item>
-            <item>title</item>
-            <item>caller_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>start_date</item>
+            <item id="ref">
+              <rank>10</rank>
+            </item>
+            <item id="org_id">
+              <rank>20</rank>
+            </item>
+            <item id="title">
+              <rank>30</rank>
+            </item>
+            <item id="caller_id">
+              <rank>40</rank>
+            </item>
+            <item id="team_id">
+              <rank>50</rank>
+            </item>
+            <item id="agent_id">
+              <rank>60</rank>
+            </item>
+            <item id="start_date">
+              <rank>70</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -200,7 +258,7 @@
         <key_type>autoincrement</key_type>
         <db_table>lnkcontacttoticket</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s %2$s</format>
           <attributes>
@@ -208,8 +266,8 @@
             <attribute id="contact_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ticket_id"/>
@@ -234,13 +292,13 @@
           <is_null_allowed>false</is_null_allowed>
           <on_target_delete>DEL_AUTO</on_target_delete>
         </field>
-       <field id="contact_email" xsi:type="AttributeExternalField">
+        <field id="contact_email" xsi:type="AttributeExternalField">
           <extkey_attcode>contact_id</extkey_attcode>
           <target_attcode>email</target_attcode>
         </field>
         <field id="role" xsi:type="AttributeString">
           <sql>role</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -248,23 +306,41 @@
       <presentation>
         <details>
           <items>
-            <item>ticket_id</item>
-            <item>contact_id</item>
-            <item>role</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="contact_id">
+              <rank>20</rank>
+            </item>
+            <item id="role">
+              <rank>30</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>ticket_id</item>
-            <item>contact_id</item>
-            <item>role</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="contact_id">
+              <rank>20</rank>
+            </item>
+            <item id="role">
+              <rank>30</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>ticket_id</item>
-            <item>contact_id</item>
-            <item>role</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="contact_id">
+              <rank>20</rank>
+            </item>
+            <item id="role">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -278,7 +354,7 @@
         <key_type>autoincrement</key_type>
         <db_table>lnkfunctionalcitoticket</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s %2$s</format>
           <attributes>
@@ -286,8 +362,8 @@
             <attribute id="functionalci_id"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="ticket_id"/>
@@ -318,7 +394,7 @@
         </field>
         <field id="impact" xsi:type="AttributeString">
           <sql>impact</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -326,23 +402,41 @@
       <presentation>
         <details>
           <items>
-            <item>ticket_id</item>
-            <item>functionalci_id</item>
-            <item>impact</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="functionalci_id">
+              <rank>20</rank>
+            </item>
+            <item id="impact">
+              <rank>30</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>ticket_id</item>
-            <item>functionalci_id</item>
-            <item>impact</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="functionalci_id">
+              <rank>20</rank>
+            </item>
+            <item id="impact">
+              <rank>30</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>ticket_id</item>
-            <item>functionalci_id</item>
-            <item>impact</item>
+            <item id="ticket_id">
+              <rank>10</rank>
+            </item>
+            <item id="functionalci_id">
+              <rank>20</rank>
+            </item>
+            <item id="impact">
+              <rank>30</rank>
+            </item>
           </items>
         </list>
       </presentation>
@@ -355,15 +449,15 @@
         <key_type>autoincrement</key_type>
         <db_table>workorder</db_table>
         <db_key_field>id</db_key_field>
-        <db_final_class_field></db_final_class_field>
+        <db_final_class_field/>
         <naming>
           <format>%1$s</format>
           <attributes>
             <attribute id="name"/>
           </attributes>
         </naming>
-        <display_template></display_template>
-        <icon></icon>
+        <display_template/>
+        <icon/>
         <reconciliation>
           <attributes>
             <attribute id="name"/>
@@ -374,7 +468,7 @@
       <fields>
         <field id="name" xsi:type="AttributeString">
           <sql>name</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="status" xsi:type="AttributeEnum">
@@ -389,7 +483,7 @@
         </field>
         <field id="description" xsi:type="AttributeText">
           <sql>description</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="ticket_id" xsi:type="AttributeExternalKey">
@@ -429,17 +523,17 @@
         </field>
         <field id="start_date" xsi:type="AttributeDateTime">
           <sql>start_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="end_date" xsi:type="AttributeDateTime">
           <sql>end_date</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>false</is_null_allowed>
         </field>
         <field id="log" xsi:type="AttributeCaseLog">
           <sql>log</sql>
-          <default_value></default_value>
+          <default_value/>
           <is_null_allowed>true</is_null_allowed>
         </field>
       </fields>
@@ -511,35 +605,77 @@
       <presentation>
         <details>
           <items>
-            <item>name</item>
-            <item>status</item>
-            <item>ticket_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>description</item>
-            <item>start_date</item>
-            <item>end_date</item>
+            <item id="name">
+              <rank>10</rank>
+            </item>
+            <item id="status">
+              <rank>20</rank>
+            </item>
+            <item id="ticket_id">
+              <rank>30</rank>
+            </item>
+            <item id="team_id">
+              <rank>40</rank>
+            </item>
+            <item id="agent_id">
+              <rank>50</rank>
+            </item>
+            <item id="description">
+              <rank>60</rank>
+            </item>
+            <item id="start_date">
+              <rank>70</rank>
+            </item>
+            <item id="end_date">
+              <rank>80</rank>
+            </item>
           </items>
         </details>
         <search>
           <items>
-            <item>name</item>
-            <item>status</item>
-            <item>ticket_id</item>
-            <item>team_id</item>
-            <item>agent_id</item>
-            <item>start_date</item>
-            <item>end_date</item>
+            <item id="name">
+              <rank>10</rank>
+            </item>
+            <item id="status">
+              <rank>20</rank>
+            </item>
+            <item id="ticket_id">
+              <rank>30</rank>
+            </item>
+            <item id="team_id">
+              <rank>40</rank>
+            </item>
+            <item id="agent_id">
+              <rank>50</rank>
+            </item>
+            <item id="start_date">
+              <rank>60</rank>
+            </item>
+            <item id="end_date">
+              <rank>70</rank>
+            </item>
           </items>
         </search>
         <list>
           <items>
-            <item>status</item>
-            <item>ticket_id</item>
-            <item>start_date</item>
-            <item>end_date</item>
-            <item>team_id</item>
-            <item>agent_id</item>
+            <item id="status">
+              <rank>10</rank>
+            </item>
+            <item id="ticket_id">
+              <rank>20</rank>
+            </item>
+            <item id="start_date">
+              <rank>30</rank>
+            </item>
+            <item id="end_date">
+              <rank>40</rank>
+            </item>
+            <item id="team_id">
+              <rank>50</rank>
+            </item>
+            <item id="agent_id">
+              <rank>60</rank>
+            </item>
           </items>
         </list>
       </presentation>

+ 25 - 0
setup/compiler.class.inc.php

@@ -243,6 +243,30 @@ EOF;
 	}
 
 	/**
+	 * Helper to form a valid ZList from the array built by GetNodeAsArrayOfItems()
+	 */	 	
+	protected function ArrayOfItemsToZList(&$aItems)
+	{
+		$aTransformed = array();
+		foreach ($aItems as $key => $value)
+		{
+			if (is_null($value))
+			{
+				$aTransformed[] = $key;
+			}
+			else
+			{
+				if (is_array($value))
+				{
+					$this->ArrayOfItemsToZList($value);
+				}
+				$aTransformed[$key] = $value;
+			}
+		}
+		$aItems = $aTransformed;
+	}
+
+	/**
 	 * Helper to format the flags for an attribute, in a given state
 	 * @param object $oAttNode DOM node containing the information to build the flags
 	 * Returns string PHP flags, based on the OPT_ATT_ constants, or empty (meaning 0, can be omitted)
@@ -847,6 +871,7 @@ EOF;
 			if ($oListNode)
 			{
 				$aAttributes = $oListNode->GetNodeAsArrayOfItems();
+				$this->ArrayOfItemsToZList($aAttributes);
 		
 				$sZAttributes = var_export($aAttributes, true);
 				$sZlists .= "		MetaModel::Init_SetZListItems('$sListCode', $sZAttributes);\n";

+ 16 - 0
setup/modelfactory.class.inc.php

@@ -1384,18 +1384,34 @@ class MFElement extends DOMElement
 		if ($oItems)
 		{
 			$res = array();
+			$aRanks = array();
 			foreach($oItems->childNodes as $oItem)
 			{
 				// When an attribute is missing
 				if ($oItem->hasAttribute('id'))
 				{
 					$key = $oItem->getAttribute('id');
+					if (array_key_exists($key, $res))
+					{
+						// Houston!
+						throw new DOMFormatException("Tag ".$oItem->getNodePath().", id '$key' already used!!!");
+					}
 					$res[$key] = $oItem->GetNodeAsArrayOfItems();
 				}
 				else
 				{
 					$res[] = $oItem->GetNodeAsArrayOfItems();
 				}
+				$sRank = $oItem->GetChildText('rank');
+				if ($sRank != '')
+				{
+					$aRanks[] = (float) $sRank;
+				}
+				else
+				{
+					$aRanks[] = max($aRanks) + 1;
+				}
+				array_multisort($aRanks, $res);
 			}
 		}
 		else

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác