datamodel.itop-tickets.xml 52 KB

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