datamodel.itop-tickets.xml 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
  3. <classes>
  4. <class id="Ticket" _delta="define">
  5. <parent>cmdbAbstractObject</parent>
  6. <properties>
  7. <comment><![CDATA[/**
  8. * Persistent classes for a CMDB
  9. *
  10. * @copyright Copyright (C) 2010-2012 Combodo SARL
  11. * @license http://opensource.org/licenses/AGPL-3.0
  12. */]]></comment>
  13. <category>bizmodel,searchable</category>
  14. <abstract>true</abstract>
  15. <key_type>autoincrement</key_type>
  16. <db_table>ticket</db_table>
  17. <db_key_field>id</db_key_field>
  18. <db_final_class_field>finalclass</db_final_class_field>
  19. <naming>
  20. <attributes>
  21. <attribute id="ref"/>
  22. </attributes>
  23. </naming>
  24. <display_template/>
  25. <icon/>
  26. <reconciliation>
  27. <attributes>
  28. <attribute id="ref"/>
  29. </attributes>
  30. </reconciliation>
  31. </properties>
  32. <fields>
  33. <field id="ref" xsi:type="AttributeString">
  34. <sql>ref</sql>
  35. <default_value/>
  36. <is_null_allowed>true</is_null_allowed>
  37. </field>
  38. <field id="title" xsi:type="AttributeString">
  39. <sql>title</sql>
  40. <default_value/>
  41. <is_null_allowed>false</is_null_allowed>
  42. </field>
  43. <field id="description" xsi:type="AttributeText">
  44. <sql>description</sql>
  45. <default_value/>
  46. <is_null_allowed>false</is_null_allowed>
  47. </field>
  48. <field id="ticket_log" xsi:type="AttributeCaseLog">
  49. <sql>ticket_log</sql>
  50. <default_value/>
  51. <is_null_allowed>true</is_null_allowed>
  52. </field>
  53. <field id="start_date" xsi:type="AttributeDateTime">
  54. <sql>start_date</sql>
  55. <default_value/>
  56. <is_null_allowed>false</is_null_allowed>
  57. </field>
  58. <field id="document_list" xsi:type="AttributeLinkedSetIndirect">
  59. <linked_class>lnkTicketToDoc</linked_class>
  60. <ext_key_to_me>ticket_id</ext_key_to_me>
  61. <count_min>0</count_min>
  62. <count_max>0</count_max>
  63. <ext_key_to_remote>document_id</ext_key_to_remote>
  64. </field>
  65. <field id="ci_list" xsi:type="AttributeLinkedSetIndirect">
  66. <linked_class>lnkTicketToCI</linked_class>
  67. <ext_key_to_me>ticket_id</ext_key_to_me>
  68. <count_min>0</count_min>
  69. <count_max>0</count_max>
  70. <ext_key_to_remote>ci_id</ext_key_to_remote>
  71. </field>
  72. <field id="contact_list" xsi:type="AttributeLinkedSetIndirect">
  73. <linked_class>lnkTicketToContact</linked_class>
  74. <ext_key_to_me>ticket_id</ext_key_to_me>
  75. <count_min>0</count_min>
  76. <count_max>0</count_max>
  77. <ext_key_to_remote>contact_id</ext_key_to_remote>
  78. </field>
  79. <field id="incident_list" xsi:type="AttributeLinkedSetIndirect">
  80. <linked_class>lnkTicketToIncident</linked_class>
  81. <ext_key_to_me>ticket_id</ext_key_to_me>
  82. <count_min>0</count_min>
  83. <count_max>0</count_max>
  84. <ext_key_to_remote>incident_id</ext_key_to_remote>
  85. </field>
  86. </fields>
  87. <methods/>
  88. <presentation>
  89. <details>
  90. <items>
  91. <item id="ref">
  92. <rank>10</rank>
  93. </item>
  94. <item id="title">
  95. <rank>20</rank>
  96. </item>
  97. <item id="description">
  98. <rank>30</rank>
  99. </item>
  100. <item id="start_date">
  101. <rank>40</rank>
  102. </item>
  103. <item id="document_list">
  104. <rank>50</rank>
  105. </item>
  106. <item id="ci_list">
  107. <rank>60</rank>
  108. </item>
  109. <item id="contact_list">
  110. <rank>70</rank>
  111. </item>
  112. <item id="incident_list">
  113. <rank>80</rank>
  114. </item>
  115. </items>
  116. </details>
  117. <search>
  118. <items>
  119. <item id="finalclass">
  120. <rank>10</rank>
  121. </item>
  122. <item id="ref">
  123. <rank>20</rank>
  124. </item>
  125. <item id="title">
  126. <rank>30</rank>
  127. </item>
  128. <item id="start_date">
  129. <rank>40</rank>
  130. </item>
  131. </items>
  132. </search>
  133. <list>
  134. <items>
  135. <item id="finalclass">
  136. <rank>10</rank>
  137. </item>
  138. <item id="ref">
  139. <rank>20</rank>
  140. </item>
  141. <item id="title">
  142. <rank>30</rank>
  143. </item>
  144. <item id="ticket_log">
  145. <rank>40</rank>
  146. </item>
  147. <item id="start_date">
  148. <rank>50</rank>
  149. </item>
  150. </items>
  151. </list>
  152. </presentation>
  153. </class>
  154. <class id="ResponseTicket" _delta="define">
  155. <parent>Ticket</parent>
  156. <properties>
  157. <category>bizmodel</category>
  158. <abstract>true</abstract>
  159. <key_type>autoincrement</key_type>
  160. <db_table>ticket_response</db_table>
  161. <db_key_field>id</db_key_field>
  162. <db_final_class_field/>
  163. <naming>
  164. <attributes>
  165. <attribute id="ref"/>
  166. </attributes>
  167. </naming>
  168. <display_template/>
  169. <icon/>
  170. <reconciliation>
  171. <attributes>
  172. <attribute id="ref"/>
  173. </attributes>
  174. </reconciliation>
  175. </properties>
  176. <fields>
  177. <field id="status" xsi:type="AttributeEnum">
  178. <values>
  179. <value>new</value>
  180. <value>assigned</value>
  181. <value>frozen</value>
  182. <value>escalated_tto</value>
  183. <value>escalated_ttr</value>
  184. <value>resolved</value>
  185. <value>closed</value>
  186. </values>
  187. <sql>status</sql>
  188. <default_value>new</default_value>
  189. <is_null_allowed>false</is_null_allowed>
  190. </field>
  191. <field id="caller_id" xsi:type="AttributeExternalKey">
  192. <filter><![CDATA[SELECT Person WHERE org_id = :this->org_id]]></filter>
  193. <dependencies>
  194. <attribute id="org_id"/>
  195. </dependencies>
  196. <sql>caller_id</sql>
  197. <target_class>Person</target_class>
  198. <is_null_allowed>true</is_null_allowed>
  199. <on_target_delete>DEL_MANUAL</on_target_delete>
  200. <jointype/>
  201. </field>
  202. <field id="caller_email" xsi:type="AttributeExternalField">
  203. <extkey_attcode>caller_id</extkey_attcode>
  204. <target_attcode>email</target_attcode>
  205. </field>
  206. <field id="org_id" xsi:type="AttributeExternalKey">
  207. <sql>org_id</sql>
  208. <target_class>Organization</target_class>
  209. <is_null_allowed>false</is_null_allowed>
  210. <on_target_delete>DEL_AUTO</on_target_delete>
  211. <jointype/>
  212. </field>
  213. <field id="org_name" xsi:type="AttributeExternalField">
  214. <extkey_attcode>org_id</extkey_attcode>
  215. <target_attcode>name</target_attcode>
  216. </field>
  217. <field id="service_id" xsi:type="AttributeExternalKey">
  218. <filter><![CDATA[SELECT Service AS s JOIN SLA AS sla ON sla.service_id=s.id JOIN lnkContractToSLA AS ln ON ln.sla_id=sla.id JOIN CustomerContract AS cc ON ln.contract_id=cc.id WHERE cc.org_id =:this->org_id]]></filter>
  219. <dependencies>
  220. <attribute id="org_id"/>
  221. </dependencies>
  222. <sql>service_id</sql>
  223. <target_class>Service</target_class>
  224. <is_null_allowed>false</is_null_allowed>
  225. <on_target_delete>DEL_MANUAL</on_target_delete>
  226. <jointype/>
  227. </field>
  228. <field id="service_name" xsi:type="AttributeExternalField">
  229. <extkey_attcode>service_id</extkey_attcode>
  230. <target_attcode>name</target_attcode>
  231. </field>
  232. <field id="servicesubcategory_id" xsi:type="AttributeExternalKey">
  233. <filter><![CDATA[SELECT ServiceSubcategory WHERE service_id = :this->service_id]]></filter>
  234. <dependencies>
  235. <attribute id="service_id"/>
  236. </dependencies>
  237. <sql>servicesubcategory_id</sql>
  238. <target_class>ServiceSubcategory</target_class>
  239. <is_null_allowed>false</is_null_allowed>
  240. <on_target_delete>DEL_MANUAL</on_target_delete>
  241. <jointype/>
  242. </field>
  243. <field id="servicesubcategory_name" xsi:type="AttributeExternalField">
  244. <extkey_attcode>servicesubcategory_id</extkey_attcode>
  245. <target_attcode>name</target_attcode>
  246. </field>
  247. <field id="product" xsi:type="AttributeString">
  248. <sql>product</sql>
  249. <default_value/>
  250. <is_null_allowed>true</is_null_allowed>
  251. </field>
  252. <field id="impact" xsi:type="AttributeEnum">
  253. <values>
  254. <value>1</value>
  255. <value>2</value>
  256. <value>3</value>
  257. </values>
  258. <sql>impact</sql>
  259. <default_value>1</default_value>
  260. <is_null_allowed>false</is_null_allowed>
  261. </field>
  262. <field id="urgency" xsi:type="AttributeEnum">
  263. <values>
  264. <value>1</value>
  265. <value>2</value>
  266. <value>3</value>
  267. </values>
  268. <sql>urgency</sql>
  269. <default_value>1</default_value>
  270. <is_null_allowed>false</is_null_allowed>
  271. </field>
  272. <field id="priority" xsi:type="AttributeEnum">
  273. <values>
  274. <value>1</value>
  275. <value>2</value>
  276. <value>3</value>
  277. </values>
  278. <sql>priority</sql>
  279. <default_value>1</default_value>
  280. <is_null_allowed>false</is_null_allowed>
  281. </field>
  282. <field id="workgroup_id" xsi:type="AttributeExternalKey">
  283. <filter><![CDATA[SELECT Team AS t JOIN CustomerContract AS cc ON cc.support_team_id=t.id JOIN lnkContractToSLA AS ln ON ln.contract_id=cc.id JOIN SLA AS sla ON ln.sla_id=sla.id WHERE sla.service_id = :this->service_id AND cc.org_id = :this->org_id]]></filter>
  284. <dependencies>
  285. <attribute id="org_id"/>
  286. <attribute id="service_id"/>
  287. </dependencies>
  288. <sql>workgroup_id</sql>
  289. <target_class>Team</target_class>
  290. <is_null_allowed>false</is_null_allowed>
  291. <on_target_delete>DEL_MANUAL</on_target_delete>
  292. <jointype/>
  293. </field>
  294. <field id="workgroup_name" xsi:type="AttributeExternalField">
  295. <extkey_attcode>workgroup_id</extkey_attcode>
  296. <target_attcode>name</target_attcode>
  297. </field>
  298. <field id="agent_id" xsi:type="AttributeExternalKey">
  299. <filter><![CDATA[SELECT Person AS p JOIN lnkTeamToContact AS l ON l.contact_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this->workgroup_id]]></filter>
  300. <dependencies>
  301. <attribute id="workgroup_id"/>
  302. </dependencies>
  303. <sql>agent_id</sql>
  304. <target_class>Person</target_class>
  305. <is_null_allowed>true</is_null_allowed>
  306. <on_target_delete>DEL_MANUAL</on_target_delete>
  307. <jointype/>
  308. </field>
  309. <field id="agent_name" xsi:type="AttributeExternalField">
  310. <extkey_attcode>agent_id</extkey_attcode>
  311. <target_attcode>name</target_attcode>
  312. </field>
  313. <field id="agent_email" xsi:type="AttributeExternalField">
  314. <extkey_attcode>agent_id</extkey_attcode>
  315. <target_attcode>email</target_attcode>
  316. </field>
  317. <field id="related_problem_id" xsi:type="AttributeExternalKey">
  318. <sql>related_problem_id</sql>
  319. <target_class>Problem</target_class>
  320. <is_null_allowed>true</is_null_allowed>
  321. <on_target_delete>DEL_MANUAL</on_target_delete>
  322. <jointype/>
  323. </field>
  324. <field id="related_problem_ref" xsi:type="AttributeExternalField">
  325. <extkey_attcode>related_problem_id</extkey_attcode>
  326. <target_attcode>ref</target_attcode>
  327. </field>
  328. <field id="related_change_id" xsi:type="AttributeExternalKey">
  329. <sql>related_change_id</sql>
  330. <target_class>Change</target_class>
  331. <is_null_allowed>true</is_null_allowed>
  332. <on_target_delete>DEL_MANUAL</on_target_delete>
  333. <jointype/>
  334. </field>
  335. <field id="related_change_ref" xsi:type="AttributeExternalField">
  336. <extkey_attcode>related_change_id</extkey_attcode>
  337. <target_attcode>ref</target_attcode>
  338. </field>
  339. <field id="close_date" xsi:type="AttributeDateTime">
  340. <sql>close_date</sql>
  341. <default_value/>
  342. <is_null_allowed>true</is_null_allowed>
  343. </field>
  344. <field id="last_update" xsi:type="AttributeDateTime">
  345. <sql>last_update</sql>
  346. <default_value/>
  347. <is_null_allowed>true</is_null_allowed>
  348. </field>
  349. <field id="assignment_date" xsi:type="AttributeDateTime">
  350. <sql>assignment_date</sql>
  351. <default_value/>
  352. <is_null_allowed>true</is_null_allowed>
  353. </field>
  354. <field id="resolution_date" xsi:type="AttributeDateTime">
  355. <sql>resolution_date</sql>
  356. <default_value/>
  357. <is_null_allowed>true</is_null_allowed>
  358. </field>
  359. <field id="tto_escalation_deadline" xsi:type="AttributeDeadline">
  360. <sql>tto_escalation_deadline</sql>
  361. <default_value/>
  362. <is_null_allowed>true</is_null_allowed>
  363. </field>
  364. <field id="ttr_escalation_deadline" xsi:type="AttributeDeadline">
  365. <sql>ttr_escalation_deadline</sql>
  366. <default_value/>
  367. <is_null_allowed>true</is_null_allowed>
  368. </field>
  369. <field id="closure_deadline" xsi:type="AttributeDeadline">
  370. <sql>closure_deadline</sql>
  371. <default_value/>
  372. <is_null_allowed>true</is_null_allowed>
  373. </field>
  374. <field id="resolution_code" xsi:type="AttributeEnum">
  375. <values>
  376. <value>fixed</value>
  377. <value>duplicate</value>
  378. <value>couldnotreproduce</value>
  379. <value>irrelevant</value>
  380. </values>
  381. <sql>resolution_code</sql>
  382. <default_value>fixed</default_value>
  383. <is_null_allowed>true</is_null_allowed>
  384. </field>
  385. <field id="solution" xsi:type="AttributeText">
  386. <sql>solution</sql>
  387. <default_value/>
  388. <is_null_allowed>true</is_null_allowed>
  389. </field>
  390. <field id="user_satisfaction" xsi:type="AttributeEnum">
  391. <values>
  392. <value>1</value>
  393. <value>2</value>
  394. <value>3</value>
  395. <value>4</value>
  396. </values>
  397. <sql>user_satisfaction</sql>
  398. <default_value>1</default_value>
  399. <is_null_allowed>true</is_null_allowed>
  400. </field>
  401. <field id="user_commment" xsi:type="AttributeText">
  402. <sql>user_commment</sql>
  403. <default_value/>
  404. <is_null_allowed>true</is_null_allowed>
  405. </field>
  406. </fields>
  407. <lifecycle>
  408. <attribute>status</attribute>
  409. <stimuli>
  410. <stimulus id="ev_assign" xsi:type="StimulusUserAction"/>
  411. <stimulus id="ev_reassign" xsi:type="StimulusUserAction"/>
  412. <stimulus id="ev_timeout" xsi:type="StimulusInternal"/>
  413. <stimulus id="ev_resolve" xsi:type="StimulusUserAction"/>
  414. <stimulus id="ev_close" xsi:type="StimulusUserAction"/>
  415. </stimuli>
  416. <states>
  417. <state id="new">
  418. <flags>
  419. <attribute id="ref">
  420. <read_only/>
  421. </attribute>
  422. <attribute id="description">
  423. <must_prompt/>
  424. </attribute>
  425. <attribute id="start_date">
  426. <read_only/>
  427. </attribute>
  428. <attribute id="caller_id">
  429. <mandatory/>
  430. </attribute>
  431. <attribute id="org_id">
  432. <must_prompt/>
  433. </attribute>
  434. <attribute id="service_id">
  435. <must_prompt/>
  436. </attribute>
  437. <attribute id="servicesubcategory_id">
  438. <must_prompt/>
  439. </attribute>
  440. <attribute id="product">
  441. <must_prompt/>
  442. </attribute>
  443. <attribute id="impact">
  444. <must_prompt/>
  445. </attribute>
  446. <attribute id="urgency">
  447. <must_prompt/>
  448. </attribute>
  449. <attribute id="priority">
  450. <read_only/>
  451. </attribute>
  452. <attribute id="workgroup_id">
  453. <must_prompt/>
  454. </attribute>
  455. <attribute id="agent_email">
  456. <hidden/>
  457. </attribute>
  458. <attribute id="related_problem_id">
  459. <hidden/>
  460. </attribute>
  461. <attribute id="related_change_id">
  462. <hidden/>
  463. </attribute>
  464. <attribute id="close_date">
  465. <hidden/>
  466. </attribute>
  467. <attribute id="last_update">
  468. <read_only/>
  469. </attribute>
  470. <attribute id="assignment_date">
  471. <hidden/>
  472. </attribute>
  473. <attribute id="resolution_date">
  474. <hidden/>
  475. </attribute>
  476. <attribute id="tto_escalation_deadline">
  477. <read_only/>
  478. </attribute>
  479. <attribute id="ttr_escalation_deadline">
  480. <hidden/>
  481. </attribute>
  482. <attribute id="closure_deadline">
  483. <hidden/>
  484. </attribute>
  485. <attribute id="resolution_code">
  486. <hidden/>
  487. </attribute>
  488. <attribute id="solution">
  489. <hidden/>
  490. </attribute>
  491. <attribute id="user_satisfaction">
  492. <hidden/>
  493. </attribute>
  494. <attribute id="user_commment">
  495. <hidden/>
  496. </attribute>
  497. </flags>
  498. <transitions>
  499. <transition id="ev_assign">
  500. <stimulus>ev_assign</stimulus>
  501. <target>assigned</target>
  502. <actions>
  503. <action>
  504. <verb>SetAssignedDate</verb>
  505. </action>
  506. </actions>
  507. </transition>
  508. <transition id="ev_timeout">
  509. <stimulus>ev_timeout</stimulus>
  510. <target>escalated_tto</target>
  511. <actions/>
  512. </transition>
  513. </transitions>
  514. </state>
  515. <state id="escalated_tto">
  516. <flags>
  517. <attribute id="ref">
  518. <read_only/>
  519. </attribute>
  520. <attribute id="start_date">
  521. <read_only/>
  522. </attribute>
  523. <attribute id="caller_id">
  524. <mandatory/>
  525. </attribute>
  526. <attribute id="priority">
  527. <read_only/>
  528. </attribute>
  529. <attribute id="agent_email">
  530. <hidden/>
  531. </attribute>
  532. <attribute id="related_problem_id">
  533. <hidden/>
  534. </attribute>
  535. <attribute id="related_change_id">
  536. <hidden/>
  537. </attribute>
  538. <attribute id="close_date">
  539. <hidden/>
  540. </attribute>
  541. <attribute id="last_update">
  542. <read_only/>
  543. </attribute>
  544. <attribute id="assignment_date">
  545. <hidden/>
  546. </attribute>
  547. <attribute id="resolution_date">
  548. <hidden/>
  549. </attribute>
  550. <attribute id="tto_escalation_deadline">
  551. <read_only/>
  552. </attribute>
  553. <attribute id="ttr_escalation_deadline">
  554. <hidden/>
  555. </attribute>
  556. <attribute id="closure_deadline">
  557. <hidden/>
  558. </attribute>
  559. <attribute id="resolution_code">
  560. <hidden/>
  561. </attribute>
  562. <attribute id="solution">
  563. <hidden/>
  564. </attribute>
  565. <attribute id="user_satisfaction">
  566. <hidden/>
  567. </attribute>
  568. <attribute id="user_commment">
  569. <hidden/>
  570. </attribute>
  571. </flags>
  572. <transitions>
  573. <transition id="ev_assign">
  574. <stimulus>ev_assign</stimulus>
  575. <target>assigned</target>
  576. <actions>
  577. <action>
  578. <verb>SetAssignedDate</verb>
  579. </action>
  580. </actions>
  581. </transition>
  582. </transitions>
  583. </state>
  584. <state id="assigned">
  585. <flags>
  586. <attribute id="ref">
  587. <read_only/>
  588. </attribute>
  589. <attribute id="title">
  590. <read_only/>
  591. </attribute>
  592. <attribute id="description">
  593. <read_only/>
  594. </attribute>
  595. <attribute id="start_date">
  596. <read_only/>
  597. </attribute>
  598. <attribute id="caller_id">
  599. <read_only/>
  600. </attribute>
  601. <attribute id="org_id">
  602. <read_only/>
  603. </attribute>
  604. <attribute id="priority">
  605. <read_only/>
  606. </attribute>
  607. <attribute id="workgroup_id">
  608. <mandatory/>
  609. <must_prompt/>
  610. </attribute>
  611. <attribute id="agent_id">
  612. <mandatory/>
  613. <must_prompt/>
  614. </attribute>
  615. <attribute id="agent_email">
  616. <read_only/>
  617. </attribute>
  618. <attribute id="close_date">
  619. <hidden/>
  620. </attribute>
  621. <attribute id="last_update">
  622. <read_only/>
  623. </attribute>
  624. <attribute id="assignment_date">
  625. <hidden/>
  626. </attribute>
  627. <attribute id="resolution_date">
  628. <hidden/>
  629. </attribute>
  630. <attribute id="tto_escalation_deadline">
  631. <hidden/>
  632. </attribute>
  633. <attribute id="ttr_escalation_deadline">
  634. <read_only/>
  635. </attribute>
  636. <attribute id="closure_deadline">
  637. <hidden/>
  638. </attribute>
  639. <attribute id="resolution_code">
  640. <hidden/>
  641. </attribute>
  642. <attribute id="solution">
  643. <hidden/>
  644. </attribute>
  645. <attribute id="user_satisfaction">
  646. <hidden/>
  647. </attribute>
  648. <attribute id="user_commment">
  649. <hidden/>
  650. </attribute>
  651. </flags>
  652. <transitions>
  653. <transition id="ev_reassign">
  654. <stimulus>ev_reassign</stimulus>
  655. <target>assigned</target>
  656. <actions/>
  657. </transition>
  658. <transition id="ev_timeout">
  659. <stimulus>ev_timeout</stimulus>
  660. <target>escalated_ttr</target>
  661. <actions/>
  662. </transition>
  663. <transition id="ev_resolve">
  664. <stimulus>ev_resolve</stimulus>
  665. <target>resolved</target>
  666. <actions>
  667. <action>
  668. <verb>SetResolveDate</verb>
  669. </action>
  670. <action>
  671. <verb>SetClosureDeadline</verb>
  672. </action>
  673. </actions>
  674. </transition>
  675. </transitions>
  676. </state>
  677. <state id="escalated_ttr">
  678. <flags>
  679. <attribute id="ref">
  680. <read_only/>
  681. </attribute>
  682. <attribute id="title">
  683. <read_only/>
  684. </attribute>
  685. <attribute id="description">
  686. <read_only/>
  687. </attribute>
  688. <attribute id="start_date">
  689. <read_only/>
  690. </attribute>
  691. <attribute id="caller_id">
  692. <read_only/>
  693. </attribute>
  694. <attribute id="org_id">
  695. <read_only/>
  696. </attribute>
  697. <attribute id="priority">
  698. <read_only/>
  699. </attribute>
  700. <attribute id="workgroup_id">
  701. <mandatory/>
  702. <must_prompt/>
  703. </attribute>
  704. <attribute id="agent_id">
  705. <mandatory/>
  706. <must_prompt/>
  707. </attribute>
  708. <attribute id="agent_email">
  709. <read_only/>
  710. </attribute>
  711. <attribute id="close_date">
  712. <hidden/>
  713. </attribute>
  714. <attribute id="last_update">
  715. <read_only/>
  716. </attribute>
  717. <attribute id="assignment_date">
  718. <hidden/>
  719. </attribute>
  720. <attribute id="resolution_date">
  721. <hidden/>
  722. </attribute>
  723. <attribute id="tto_escalation_deadline">
  724. <hidden/>
  725. </attribute>
  726. <attribute id="ttr_escalation_deadline">
  727. <read_only/>
  728. </attribute>
  729. <attribute id="closure_deadline">
  730. <hidden/>
  731. </attribute>
  732. <attribute id="resolution_code">
  733. <hidden/>
  734. </attribute>
  735. <attribute id="solution">
  736. <hidden/>
  737. </attribute>
  738. <attribute id="user_satisfaction">
  739. <hidden/>
  740. </attribute>
  741. <attribute id="user_commment">
  742. <hidden/>
  743. </attribute>
  744. </flags>
  745. <transitions>
  746. <transition id="ev_reassign">
  747. <stimulus>ev_reassign</stimulus>
  748. <target>escalated_ttr</target>
  749. <actions/>
  750. </transition>
  751. <transition id="ev_resolve">
  752. <stimulus>ev_resolve</stimulus>
  753. <target>resolved</target>
  754. <actions>
  755. <action>
  756. <verb>SetResolveDate</verb>
  757. </action>
  758. <action>
  759. <verb>SetClosureDeadline</verb>
  760. </action>
  761. </actions>
  762. </transition>
  763. </transitions>
  764. </state>
  765. <state id="frozen">
  766. <flags>
  767. <attribute id="ref">
  768. <read_only/>
  769. </attribute>
  770. <attribute id="title">
  771. <read_only/>
  772. </attribute>
  773. <attribute id="description">
  774. <read_only/>
  775. </attribute>
  776. <attribute id="start_date">
  777. <read_only/>
  778. </attribute>
  779. <attribute id="caller_id">
  780. <read_only/>
  781. </attribute>
  782. <attribute id="org_id">
  783. <read_only/>
  784. </attribute>
  785. <attribute id="priority">
  786. <read_only/>
  787. </attribute>
  788. <attribute id="workgroup_id">
  789. <mandatory/>
  790. </attribute>
  791. <attribute id="agent_id">
  792. <mandatory/>
  793. </attribute>
  794. <attribute id="agent_email">
  795. <read_only/>
  796. </attribute>
  797. <attribute id="close_date">
  798. <hidden/>
  799. </attribute>
  800. <attribute id="last_update">
  801. <read_only/>
  802. </attribute>
  803. <attribute id="assignment_date">
  804. <hidden/>
  805. </attribute>
  806. <attribute id="resolution_date">
  807. <hidden/>
  808. </attribute>
  809. <attribute id="tto_escalation_deadline">
  810. <hidden/>
  811. </attribute>
  812. <attribute id="ttr_escalation_deadline">
  813. <read_only/>
  814. </attribute>
  815. <attribute id="closure_deadline">
  816. <hidden/>
  817. </attribute>
  818. <attribute id="resolution_code">
  819. <hidden/>
  820. </attribute>
  821. <attribute id="solution">
  822. <hidden/>
  823. </attribute>
  824. <attribute id="user_satisfaction">
  825. <hidden/>
  826. </attribute>
  827. <attribute id="user_commment">
  828. <hidden/>
  829. </attribute>
  830. </flags>
  831. <transitions/>
  832. </state>
  833. <state id="resolved">
  834. <flags>
  835. <attribute id="ref">
  836. <read_only/>
  837. </attribute>
  838. <attribute id="title">
  839. <read_only/>
  840. </attribute>
  841. <attribute id="description">
  842. <read_only/>
  843. </attribute>
  844. <attribute id="start_date">
  845. <read_only/>
  846. </attribute>
  847. <attribute id="caller_id">
  848. <read_only/>
  849. </attribute>
  850. <attribute id="org_id">
  851. <read_only/>
  852. </attribute>
  853. <attribute id="service_id">
  854. <read_only/>
  855. </attribute>
  856. <attribute id="servicesubcategory_id">
  857. <read_only/>
  858. </attribute>
  859. <attribute id="product">
  860. <read_only/>
  861. </attribute>
  862. <attribute id="impact">
  863. <read_only/>
  864. </attribute>
  865. <attribute id="urgency">
  866. <read_only/>
  867. </attribute>
  868. <attribute id="priority">
  869. <read_only/>
  870. </attribute>
  871. <attribute id="workgroup_id">
  872. <read_only/>
  873. </attribute>
  874. <attribute id="agent_id">
  875. <read_only/>
  876. </attribute>
  877. <attribute id="agent_email">
  878. <read_only/>
  879. </attribute>
  880. <attribute id="close_date">
  881. <hidden/>
  882. </attribute>
  883. <attribute id="last_update">
  884. <read_only/>
  885. </attribute>
  886. <attribute id="assignment_date">
  887. <hidden/>
  888. </attribute>
  889. <attribute id="resolution_date">
  890. <hidden/>
  891. </attribute>
  892. <attribute id="tto_escalation_deadline">
  893. <hidden/>
  894. </attribute>
  895. <attribute id="ttr_escalation_deadline">
  896. <hidden/>
  897. </attribute>
  898. <attribute id="closure_deadline">
  899. <read_only/>
  900. </attribute>
  901. <attribute id="resolution_code">
  902. <must_prompt/>
  903. </attribute>
  904. <attribute id="solution">
  905. <must_prompt/>
  906. </attribute>
  907. <attribute id="user_satisfaction">
  908. <hidden/>
  909. </attribute>
  910. <attribute id="user_commment">
  911. <hidden/>
  912. </attribute>
  913. </flags>
  914. <transitions>
  915. <transition id="ev_reassign">
  916. <stimulus>ev_reassign</stimulus>
  917. <target>assigned</target>
  918. <actions/>
  919. </transition>
  920. <transition id="ev_close">
  921. <stimulus>ev_close</stimulus>
  922. <target>closed</target>
  923. <actions>
  924. <action>
  925. <verb>SetClosureDate</verb>
  926. </action>
  927. </actions>
  928. </transition>
  929. </transitions>
  930. </state>
  931. <state id="closed">
  932. <flags>
  933. <attribute id="ref">
  934. <read_only/>
  935. </attribute>
  936. <attribute id="title">
  937. <read_only/>
  938. </attribute>
  939. <attribute id="description">
  940. <read_only/>
  941. </attribute>
  942. <attribute id="ticket_log">
  943. <read_only/>
  944. </attribute>
  945. <attribute id="start_date">
  946. <read_only/>
  947. </attribute>
  948. <attribute id="caller_id">
  949. <read_only/>
  950. </attribute>
  951. <attribute id="org_id">
  952. <read_only/>
  953. </attribute>
  954. <attribute id="service_id">
  955. <read_only/>
  956. </attribute>
  957. <attribute id="servicesubcategory_id">
  958. <read_only/>
  959. </attribute>
  960. <attribute id="product">
  961. <read_only/>
  962. </attribute>
  963. <attribute id="impact">
  964. <read_only/>
  965. </attribute>
  966. <attribute id="urgency">
  967. <read_only/>
  968. </attribute>
  969. <attribute id="priority">
  970. <read_only/>
  971. </attribute>
  972. <attribute id="workgroup_id">
  973. <read_only/>
  974. </attribute>
  975. <attribute id="agent_id">
  976. <read_only/>
  977. </attribute>
  978. <attribute id="agent_email">
  979. <read_only/>
  980. </attribute>
  981. <attribute id="close_date">
  982. <read_only/>
  983. </attribute>
  984. <attribute id="last_update">
  985. <read_only/>
  986. </attribute>
  987. <attribute id="assignment_date">
  988. <hidden/>
  989. </attribute>
  990. <attribute id="resolution_date">
  991. <hidden/>
  992. </attribute>
  993. <attribute id="tto_escalation_deadline">
  994. <hidden/>
  995. </attribute>
  996. <attribute id="ttr_escalation_deadline">
  997. <hidden/>
  998. </attribute>
  999. <attribute id="closure_deadline">
  1000. <hidden/>
  1001. </attribute>
  1002. <attribute id="resolution_code">
  1003. <read_only/>
  1004. </attribute>
  1005. <attribute id="solution">
  1006. <read_only/>
  1007. </attribute>
  1008. <attribute id="user_satisfaction">
  1009. <must_prompt/>
  1010. </attribute>
  1011. <attribute id="user_commment">
  1012. <must_prompt/>
  1013. </attribute>
  1014. </flags>
  1015. <transitions/>
  1016. </state>
  1017. </states>
  1018. </lifecycle>
  1019. <methods>
  1020. <method id="SetClosureDeadline">
  1021. <static>false</static>
  1022. <access>public</access>
  1023. <type>LifecycleAction</type>
  1024. <code><![CDATA[ public function SetClosureDeadline($sStimulusCode)
  1025. {
  1026. $iMaxWaitHours = 24;
  1027. $this->Set('closure_deadline', time() + $iMaxWaitHours * 3600);
  1028. return true;
  1029. }]]></code>
  1030. </method>
  1031. <method id="SetAssignedDate">
  1032. <static>false</static>
  1033. <access>public</access>
  1034. <type>LifecycleAction</type>
  1035. <code><![CDATA[ public function SetAssignedDate($sStimulusCode)
  1036. {
  1037. $this->Set('assignment_date', time());
  1038. return true;
  1039. }]]></code>
  1040. </method>
  1041. <method id="SetResolveDate">
  1042. <static>false</static>
  1043. <access>public</access>
  1044. <type>LifecycleAction</type>
  1045. <code><![CDATA[ public function SetResolveDate($sStimulusCode)
  1046. {
  1047. $this->Set('resolution_date', time());
  1048. return true;
  1049. }]]></code>
  1050. </method>
  1051. <method id="SetClosureDate">
  1052. <static>false</static>
  1053. <access>public</access>
  1054. <type>LifecycleAction</type>
  1055. <code><![CDATA[ public function SetClosureDate($sStimulusCode)
  1056. {
  1057. $this->Set('close_date', time());
  1058. return true;
  1059. }]]></code>
  1060. </method>
  1061. <method id="ComputeSLT">
  1062. <comment><![CDATA[/**
  1063. * Determines the shortest SLT, for this ticket, for the given metric. Returns null is no SLT was found
  1064. * @param string $sMetric Type of metric 'TTO', 'TTR', etc as defined in the SLT class
  1065. * @return hash Array with 'SLT' => name of the SLT selected, 'value' => duration in seconds of the SLT metric, null if no SLT applies to this ticket
  1066. */]]></comment>
  1067. <static>false</static>
  1068. <access>public</access>
  1069. <type>LifecycleAction</type>
  1070. <code><![CDATA[ public function ComputeSLT($sMetric = 'TTO')
  1071. {
  1072. $aResult = null;
  1073. if (MetaModel::IsValidClass('SLT'))
  1074. {
  1075. $sOQL = "SELECT SLT JOIN lnkSLTToSLA AS L1 ON L1.slt_id=SLT.id JOIN SLA ON L1.sla_id = SLA.id JOIN lnkContractToSLA AS L2 ON L2.sla_id = SLA.id JOIN CustomerContract ON L2.contract_id = CustomerContract.id
  1076. WHERE SLT.ticket_priority = :priority AND SLA.service_id = :service_id AND SLT.metric = :metric AND CustomerContract.org_id = :org_id";
  1077. $oSLTSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
  1078. array(),
  1079. array(
  1080. 'priority' => $this->Get('priority'),
  1081. 'service_id' => $this->Get('service_id'),
  1082. 'metric' => $sMetric,
  1083. 'org_id' => $this->Get('org_id'),
  1084. )
  1085. );
  1086. $iMinDuration = PHP_INT_MAX;
  1087. $sSLTName = '';
  1088. while($oSLT = $oSLTSet->Fetch())
  1089. {
  1090. $iDuration = (int)$oSLT->Get('value');
  1091. $sUnit = $oSLT->Get('value_unit');
  1092. //echo "<p>Found SLT: ".$oSLT->GetName()." - $iDuration ($sUnit)</p>\n";
  1093. switch($sUnit)
  1094. {
  1095. case 'days':
  1096. $iDuration = $iDuration * 24; // 24 hours in 1 days
  1097. // Fall though
  1098. case 'hours':
  1099. $iDuration = $iDuration * 60; // 60 minutes in 1 hour
  1100. // Fall though
  1101. case 'minutes':
  1102. $iDuration = $iDuration * 60;
  1103. }
  1104. if ($iDuration < $iMinDuration)
  1105. {
  1106. $iMinDuration = $iDuration;
  1107. $sSLTName = $oSLT->GetName();
  1108. }
  1109. }
  1110. if ($iMinDuration == PHP_INT_MAX)
  1111. {
  1112. $aResult = null;
  1113. }
  1114. else
  1115. {
  1116. $aResult = array('SLT' => $sSLTName, 'value' => $iMinDuration);
  1117. }
  1118. }
  1119. return $aResult;
  1120. }]]></code>
  1121. </method>
  1122. <method id="ComputePriority">
  1123. <comment>/**
  1124. * Compute the priority of the ticket based on its impact and urgency
  1125. * @return integer The priority of the ticket 1(high) .. 3(low)
  1126. */</comment>
  1127. <static>false</static>
  1128. <access>public</access>
  1129. <type>LifecycleAction</type>
  1130. <code><![CDATA[ public function ComputePriority()
  1131. {
  1132. // priority[impact][urgency]
  1133. $aPriorities = array(
  1134. // single person
  1135. 1 => array(
  1136. 1 => 1,
  1137. 2 => 1,
  1138. 3 => 2,
  1139. ),
  1140. // a group
  1141. 2 => array(
  1142. 1 => 1,
  1143. 2 => 2,
  1144. 3 => 3,
  1145. ),
  1146. // a departement!
  1147. 3 => array(
  1148. 1 => 2,
  1149. 2 => 3,
  1150. 3 => 3,
  1151. ),
  1152. );
  1153. $iPriority = 1;
  1154. if (isset($aPriorities[(int)$this->Get('impact')][(int)$this->Get('urgency')]))
  1155. {
  1156. $iPriority = $aPriorities[(int)$this->Get('impact')][(int)$this->Get('urgency')];
  1157. }
  1158. return $iPriority;
  1159. }]]></code>
  1160. </method>
  1161. <method id="ComputeValues">
  1162. <static>false</static>
  1163. <access>public</access>
  1164. <type>Overload-DBObject</type>
  1165. <code><![CDATA[ public function ComputeValues()
  1166. {
  1167. // Compute the priority of the ticket
  1168. $this->Set('priority', $this->ComputePriority());
  1169. // Compute the SLA deadlines, if any is applicable to this ticket
  1170. $aSLT = $this->ComputeSLT('TTO');
  1171. if ($aSLT != null)
  1172. {
  1173. $oStartDate = new DateTime($this->Get('start_date'));
  1174. $oDeadline = SLAComputation::GetDeadline($this, $aSLT['value'], $oStartDate);
  1175. $this->Set('tto_escalation_deadline', $oDeadline->format('U'));
  1176. }
  1177. else
  1178. {
  1179. $this->Set('tto_escalation_deadline', null);
  1180. }
  1181. $aSLT = $this->ComputeSLT('TTR');
  1182. if ($aSLT != null)
  1183. {
  1184. $oStartDate = new DateTime($this->Get('start_date'));
  1185. $oDeadline = SLAComputation::GetDeadline($this, $aSLT['value'], $oStartDate);
  1186. $this->Set('ttr_escalation_deadline', $oDeadline->format('U'));
  1187. }
  1188. else
  1189. {
  1190. $this->Set('ttr_escalation_deadline', null);
  1191. }
  1192. }]]></code>
  1193. </method>
  1194. <method id="GetHilightClass">
  1195. <comment><![CDATA[/**
  1196. * Determines if the ticket must be hilighted in the list, if we're about to miss a SLA for instance
  1197. */]]></comment>
  1198. <static>false</static>
  1199. <access>public</access>
  1200. <type>Overload-iDisplay</type>
  1201. <code><![CDATA[ public function GetHilightClass()
  1202. {
  1203. $sHilightClass = '';
  1204. switch($this->GetState())
  1205. {
  1206. case 'new':
  1207. $oEscalationDeadline = $this->Get('tto_escalation_deadline');
  1208. if ($oEscalationDeadline != null)
  1209. {
  1210. // A SLA is running
  1211. $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
  1212. $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
  1213. $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
  1214. if ($ratio <= 0)
  1215. {
  1216. $sHilightClass = HILIGHT_CLASS_CRITICAL;
  1217. }
  1218. else if ($ratio <= 0.25)
  1219. {
  1220. $sHilightClass = HILIGHT_CLASS_WARNING;
  1221. }
  1222. }
  1223. break;
  1224. case 'assigned':
  1225. $oEscalationDeadline = $this->Get('ttr_escalation_deadline');
  1226. if ($oEscalationDeadline != null)
  1227. {
  1228. // A SLA is running
  1229. $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
  1230. $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
  1231. $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
  1232. if ($ratio <= 0)
  1233. {
  1234. $sHilightClass = HILIGHT_CLASS_CRITICAL;
  1235. }
  1236. else if ($ratio <= 0.25)
  1237. {
  1238. $sHilightClass = HILIGHT_CLASS_WARNING;
  1239. }
  1240. }
  1241. break;
  1242. case 'escalated_tto':
  1243. case 'escalated_ttr':
  1244. $sHilightClass = HILIGHT_CLASS_CRITICAL;
  1245. break;
  1246. }
  1247. return $sHilightClass;
  1248. }]]></code>
  1249. </method>
  1250. <method id="OnInsert">
  1251. <static>false</static>
  1252. <access>protected</access>
  1253. <type>Overload-DBObject</type>
  1254. <code><![CDATA[ protected function OnInsert()
  1255. {
  1256. $this->Set('last_update', time());
  1257. }]]></code>
  1258. </method>
  1259. <method id="OnUpdate">
  1260. <static>false</static>
  1261. <access>protected</access>
  1262. <type>Overload-DBObject</type>
  1263. <code><![CDATA[ protected function OnUpdate()
  1264. {
  1265. $this->Set('last_update', time());
  1266. }]]></code>
  1267. </method>
  1268. </methods>
  1269. <presentation>
  1270. <details>
  1271. <items>
  1272. <item id="ref">
  1273. <rank>10</rank>
  1274. </item>
  1275. <item id="title">
  1276. <rank>20</rank>
  1277. </item>
  1278. <item id="org_id">
  1279. <rank>30</rank>
  1280. </item>
  1281. <item id="start_date">
  1282. <rank>40</rank>
  1283. </item>
  1284. <item id="tto_escalation_deadline">
  1285. <rank>50</rank>
  1286. </item>
  1287. <item id="ttr_escalation_deadline">
  1288. <rank>60</rank>
  1289. </item>
  1290. <item id="closure_deadline">
  1291. <rank>70</rank>
  1292. </item>
  1293. <item id="document_list">
  1294. <rank>80</rank>
  1295. </item>
  1296. <item id="ci_list">
  1297. <rank>90</rank>
  1298. </item>
  1299. <item id="contact_list">
  1300. <rank>100</rank>
  1301. </item>
  1302. <item id="status">
  1303. <rank>110</rank>
  1304. </item>
  1305. <item id="caller_id">
  1306. <rank>120</rank>
  1307. </item>
  1308. <item id="service_id">
  1309. <rank>130</rank>
  1310. </item>
  1311. <item id="servicesubcategory_id">
  1312. <rank>140</rank>
  1313. </item>
  1314. <item id="product">
  1315. <rank>150</rank>
  1316. </item>
  1317. <item id="impact">
  1318. <rank>160</rank>
  1319. </item>
  1320. <item id="urgency">
  1321. <rank>170</rank>
  1322. </item>
  1323. <item id="priority">
  1324. <rank>180</rank>
  1325. </item>
  1326. <item id="workgroup_id">
  1327. <rank>190</rank>
  1328. </item>
  1329. <item id="agent_id">
  1330. <rank>200</rank>
  1331. </item>
  1332. <item id="agent_email">
  1333. <rank>210</rank>
  1334. </item>
  1335. <item id="related_problem_id">
  1336. <rank>220</rank>
  1337. </item>
  1338. <item id="related_change_id">
  1339. <rank>230</rank>
  1340. </item>
  1341. <item id="close_date">
  1342. <rank>240</rank>
  1343. </item>
  1344. <item id="last_update">
  1345. <rank>250</rank>
  1346. </item>
  1347. <item id="assignment_date">
  1348. <rank>260</rank>
  1349. </item>
  1350. <item id="resolution_code">
  1351. <rank>270</rank>
  1352. </item>
  1353. <item id="solution">
  1354. <rank>280</rank>
  1355. </item>
  1356. <item id="user_satisfaction">
  1357. <rank>290</rank>
  1358. </item>
  1359. <item id="user_commment">
  1360. <rank>300</rank>
  1361. </item>
  1362. </items>
  1363. </details>
  1364. <search>
  1365. <items>
  1366. <item id="finalclass">
  1367. <rank>10</rank>
  1368. </item>
  1369. <item id="ref">
  1370. <rank>20</rank>
  1371. </item>
  1372. <item id="title">
  1373. <rank>30</rank>
  1374. </item>
  1375. <item id="org_id">
  1376. <rank>40</rank>
  1377. </item>
  1378. <item id="start_date">
  1379. <rank>50</rank>
  1380. </item>
  1381. <item id="status">
  1382. <rank>60</rank>
  1383. </item>
  1384. <item id="caller_id">
  1385. <rank>70</rank>
  1386. </item>
  1387. <item id="service_id">
  1388. <rank>80</rank>
  1389. </item>
  1390. <item id="servicesubcategory_id">
  1391. <rank>90</rank>
  1392. </item>
  1393. <item id="product">
  1394. <rank>100</rank>
  1395. </item>
  1396. <item id="impact">
  1397. <rank>110</rank>
  1398. </item>
  1399. <item id="urgency">
  1400. <rank>120</rank>
  1401. </item>
  1402. <item id="priority">
  1403. <rank>130</rank>
  1404. </item>
  1405. <item id="workgroup_id">
  1406. <rank>140</rank>
  1407. </item>
  1408. <item id="agent_id">
  1409. <rank>150</rank>
  1410. </item>
  1411. <item id="agent_email">
  1412. <rank>160</rank>
  1413. </item>
  1414. <item id="close_date">
  1415. <rank>170</rank>
  1416. </item>
  1417. <item id="resolution_code">
  1418. <rank>180</rank>
  1419. </item>
  1420. <item id="solution">
  1421. <rank>190</rank>
  1422. </item>
  1423. <item id="user_satisfaction">
  1424. <rank>200</rank>
  1425. </item>
  1426. <item id="user_commment">
  1427. <rank>210</rank>
  1428. </item>
  1429. </items>
  1430. </search>
  1431. <list>
  1432. <items>
  1433. <item id="finalclass">
  1434. <rank>10</rank>
  1435. </item>
  1436. <item id="title">
  1437. <rank>20</rank>
  1438. </item>
  1439. <item id="org_id">
  1440. <rank>30</rank>
  1441. </item>
  1442. <item id="start_date">
  1443. <rank>40</rank>
  1444. </item>
  1445. <item id="status">
  1446. <rank>50</rank>
  1447. </item>
  1448. <item id="caller_id">
  1449. <rank>60</rank>
  1450. </item>
  1451. <item id="service_id">
  1452. <rank>70</rank>
  1453. </item>
  1454. <item id="priority">
  1455. <rank>80</rank>
  1456. </item>
  1457. <item id="workgroup_id">
  1458. <rank>90</rank>
  1459. </item>
  1460. <item id="agent_id">
  1461. <rank>100</rank>
  1462. </item>
  1463. <item id="last_update">
  1464. <rank>110</rank>
  1465. </item>
  1466. </items>
  1467. </list>
  1468. </presentation>
  1469. </class>
  1470. <class id="lnkTicketToDoc" _delta="define">
  1471. <parent>cmdbAbstractObject</parent>
  1472. <properties>
  1473. <is_link>1</is_link>
  1474. <category>bizmodel,searchable,incidentmgmt,requestmgmt,changemgmt,problemmgmt,lnkticket</category>
  1475. <abstract>false</abstract>
  1476. <key_type>autoincrement</key_type>
  1477. <db_table>lnktickettodoc</db_table>
  1478. <db_key_field>id</db_key_field>
  1479. <db_final_class_field/>
  1480. <naming>
  1481. <attributes>
  1482. <attribute id="ticket_id"/>
  1483. </attributes>
  1484. </naming>
  1485. <display_template/>
  1486. <icon/>
  1487. <reconciliation>
  1488. <attributes>
  1489. <attribute id="ticket_id"/>
  1490. <attribute id="document_id"/>
  1491. </attributes>
  1492. </reconciliation>
  1493. </properties>
  1494. <fields>
  1495. <field id="ticket_id" xsi:type="AttributeExternalKey">
  1496. <sql>ticket_id</sql>
  1497. <target_class>Ticket</target_class>
  1498. <is_null_allowed>false</is_null_allowed>
  1499. <on_target_delete>DEL_AUTO</on_target_delete>
  1500. <jointype/>
  1501. </field>
  1502. <field id="ticket_ref" xsi:type="AttributeExternalField">
  1503. <extkey_attcode>ticket_id</extkey_attcode>
  1504. <target_attcode>ref</target_attcode>
  1505. </field>
  1506. <field id="document_id" xsi:type="AttributeExternalKey">
  1507. <sql>document_id</sql>
  1508. <target_class>Document</target_class>
  1509. <is_null_allowed>false</is_null_allowed>
  1510. <on_target_delete>DEL_AUTO</on_target_delete>
  1511. <jointype/>
  1512. </field>
  1513. <field id="document_name" xsi:type="AttributeExternalField">
  1514. <extkey_attcode>document_id</extkey_attcode>
  1515. <target_attcode>name</target_attcode>
  1516. </field>
  1517. </fields>
  1518. <methods/>
  1519. <presentation>
  1520. <details>
  1521. <items>
  1522. <item id="ticket_id">
  1523. <rank>10</rank>
  1524. </item>
  1525. <item id="document_id">
  1526. <rank>20</rank>
  1527. </item>
  1528. </items>
  1529. </details>
  1530. <search>
  1531. <items>
  1532. <item id="ticket_id">
  1533. <rank>10</rank>
  1534. </item>
  1535. <item id="document_id">
  1536. <rank>20</rank>
  1537. </item>
  1538. </items>
  1539. </search>
  1540. <list>
  1541. <items>
  1542. <item id="ticket_id">
  1543. <rank>10</rank>
  1544. </item>
  1545. <item id="document_id">
  1546. <rank>20</rank>
  1547. </item>
  1548. </items>
  1549. </list>
  1550. </presentation>
  1551. </class>
  1552. <class id="lnkTicketToContact" _delta="define">
  1553. <parent>cmdbAbstractObject</parent>
  1554. <properties>
  1555. <is_link>1</is_link>
  1556. <category>bizmodel,searchable,incidentmgmt,requestmgmt,changemgmt,problemmgmt,lnkticket</category>
  1557. <abstract>false</abstract>
  1558. <key_type>autoincrement</key_type>
  1559. <db_table>lnktickettocontact</db_table>
  1560. <db_key_field>id</db_key_field>
  1561. <db_final_class_field/>
  1562. <naming>
  1563. <attributes>
  1564. <attribute id="ticket_id"/>
  1565. </attributes>
  1566. </naming>
  1567. <display_template/>
  1568. <icon/>
  1569. <reconciliation>
  1570. <attributes>
  1571. <attribute id="ticket_id"/>
  1572. <attribute id="contact_id"/>
  1573. </attributes>
  1574. </reconciliation>
  1575. </properties>
  1576. <fields>
  1577. <field id="ticket_id" xsi:type="AttributeExternalKey">
  1578. <sql>ticket_id</sql>
  1579. <target_class>Ticket</target_class>
  1580. <is_null_allowed>false</is_null_allowed>
  1581. <on_target_delete>DEL_AUTO</on_target_delete>
  1582. <jointype/>
  1583. </field>
  1584. <field id="ticket_ref" xsi:type="AttributeExternalField">
  1585. <extkey_attcode>ticket_id</extkey_attcode>
  1586. <target_attcode>ref</target_attcode>
  1587. </field>
  1588. <field id="contact_id" xsi:type="AttributeExternalKey">
  1589. <sql>contact_id</sql>
  1590. <target_class>Contact</target_class>
  1591. <is_null_allowed>false</is_null_allowed>
  1592. <on_target_delete>DEL_AUTO</on_target_delete>
  1593. <jointype/>
  1594. </field>
  1595. <field id="contact_name" xsi:type="AttributeExternalField">
  1596. <extkey_attcode>contact_id</extkey_attcode>
  1597. <target_attcode>name</target_attcode>
  1598. </field>
  1599. <field id="contact_email" xsi:type="AttributeExternalField">
  1600. <extkey_attcode>contact_id</extkey_attcode>
  1601. <target_attcode>email</target_attcode>
  1602. </field>
  1603. <field id="role" xsi:type="AttributeString">
  1604. <sql>role</sql>
  1605. <default_value/>
  1606. <is_null_allowed>true</is_null_allowed>
  1607. </field>
  1608. </fields>
  1609. <methods/>
  1610. <presentation>
  1611. <details>
  1612. <items>
  1613. <item id="ticket_id">
  1614. <rank>10</rank>
  1615. </item>
  1616. <item id="contact_id">
  1617. <rank>20</rank>
  1618. </item>
  1619. <item id="contact_email">
  1620. <rank>30</rank>
  1621. </item>
  1622. <item id="role">
  1623. <rank>40</rank>
  1624. </item>
  1625. </items>
  1626. </details>
  1627. <search>
  1628. <items>
  1629. <item id="ticket_id">
  1630. <rank>10</rank>
  1631. </item>
  1632. <item id="contact_id">
  1633. <rank>20</rank>
  1634. </item>
  1635. <item id="contact_email">
  1636. <rank>30</rank>
  1637. </item>
  1638. <item id="role">
  1639. <rank>40</rank>
  1640. </item>
  1641. </items>
  1642. </search>
  1643. <list>
  1644. <items>
  1645. <item id="ticket_id">
  1646. <rank>10</rank>
  1647. </item>
  1648. <item id="contact_id">
  1649. <rank>20</rank>
  1650. </item>
  1651. <item id="contact_email">
  1652. <rank>30</rank>
  1653. </item>
  1654. <item id="role">
  1655. <rank>40</rank>
  1656. </item>
  1657. </items>
  1658. </list>
  1659. </presentation>
  1660. </class>
  1661. <class id="lnkTicketToCI" _delta="define">
  1662. <parent>cmdbAbstractObject</parent>
  1663. <properties>
  1664. <is_link>1</is_link>
  1665. <category>bizmodel,searchable,incidentmgmt,requestmgmt,changemgmt,problemmgmt,lnkticket</category>
  1666. <abstract>false</abstract>
  1667. <key_type>autoincrement</key_type>
  1668. <db_table>lnktickettoci</db_table>
  1669. <db_key_field>id</db_key_field>
  1670. <db_final_class_field/>
  1671. <naming>
  1672. <attributes>
  1673. <attribute id="ticket_id"/>
  1674. </attributes>
  1675. </naming>
  1676. <display_template/>
  1677. <icon/>
  1678. <reconciliation>
  1679. <attributes>
  1680. <attribute id="ticket_id"/>
  1681. <attribute id="ci_id"/>
  1682. </attributes>
  1683. </reconciliation>
  1684. </properties>
  1685. <fields>
  1686. <field id="ticket_id" xsi:type="AttributeExternalKey">
  1687. <sql>ticket_id</sql>
  1688. <target_class>Ticket</target_class>
  1689. <is_null_allowed>false</is_null_allowed>
  1690. <on_target_delete>DEL_AUTO</on_target_delete>
  1691. <jointype/>
  1692. </field>
  1693. <field id="ticket_ref" xsi:type="AttributeExternalField">
  1694. <extkey_attcode>ticket_id</extkey_attcode>
  1695. <target_attcode>ref</target_attcode>
  1696. </field>
  1697. <field id="ci_id" xsi:type="AttributeExternalKey">
  1698. <sql>ci_id</sql>
  1699. <target_class>FunctionalCI</target_class>
  1700. <is_null_allowed>false</is_null_allowed>
  1701. <on_target_delete>DEL_AUTO</on_target_delete>
  1702. <jointype/>
  1703. </field>
  1704. <field id="ci_name" xsi:type="AttributeExternalField">
  1705. <extkey_attcode>ci_id</extkey_attcode>
  1706. <target_attcode>name</target_attcode>
  1707. </field>
  1708. <field id="ci_status" xsi:type="AttributeExternalField">
  1709. <extkey_attcode>ci_id</extkey_attcode>
  1710. <target_attcode>status</target_attcode>
  1711. </field>
  1712. <field id="impact" xsi:type="AttributeString">
  1713. <sql>impact</sql>
  1714. <default_value/>
  1715. <is_null_allowed>true</is_null_allowed>
  1716. </field>
  1717. </fields>
  1718. <methods/>
  1719. <presentation>
  1720. <details>
  1721. <items>
  1722. <item id="ticket_id">
  1723. <rank>10</rank>
  1724. </item>
  1725. <item id="ci_id">
  1726. <rank>20</rank>
  1727. </item>
  1728. <item id="impact">
  1729. <rank>30</rank>
  1730. </item>
  1731. <item id="ci_status">
  1732. <rank>40</rank>
  1733. </item>
  1734. </items>
  1735. </details>
  1736. <search>
  1737. <items>
  1738. <item id="ticket_id">
  1739. <rank>10</rank>
  1740. </item>
  1741. <item id="ci_id">
  1742. <rank>20</rank>
  1743. </item>
  1744. <item id="ci_status">
  1745. <rank>30</rank>
  1746. </item>
  1747. </items>
  1748. </search>
  1749. <list>
  1750. <items>
  1751. <item id="ticket_id">
  1752. <rank>10</rank>
  1753. </item>
  1754. <item id="ci_id">
  1755. <rank>20</rank>
  1756. </item>
  1757. <item id="impact">
  1758. <rank>30</rank>
  1759. </item>
  1760. <item id="ci_status">
  1761. <rank>40</rank>
  1762. </item>
  1763. </items>
  1764. </list>
  1765. </presentation>
  1766. </class>
  1767. </classes>
  1768. </itop_design>