datamodel.itop-request-mgmt.xml 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
  3. <constants>
  4. <constant id="PORTAL_POWER_USER_PROFILE" xsi:type="string" _delta="define"><![CDATA[Portal power user]]></constant>
  5. <constant id="PORTAL_SERVICECATEGORY_QUERY" xsi:type="string" _delta="define"><![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 = :org_id]]></constant>
  6. <constant id="PORTAL_SERVICE_SUBCATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT ServiceSubcategory WHERE service_id = :svc_id]]></constant>
  7. <constant id="PORTAL_VALIDATE_SERVICECATEGORY_QUERY" xsi:type="string" _delta="define"><![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 = :org_id AND s.id = :id]]></constant>
  8. <constant id="PORTAL_VALIDATE_SERVICESUBCATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT ServiceSubcategory AS Sub JOIN Service AS Svc ON Sub.service_id = Svc.id WHERE Sub.id=:id]]></constant>
  9. <constant id="PORTAL_ALL_PARAMS" xsi:type="string" _delta="define"><![CDATA[from_service_id,org_id,caller_id,service_id,servicesubcategory_id,title,description,impact,urgency,workgroup_id,moreinfo,caller_id,start_date,end_date,duration,impact_duration]]></constant>
  10. <constant id="PORTAL_SET_TYPE_FROM" xsi:type="string" _delta="define"><![CDATA[]]></constant>
  11. <constant id="PORTAL_TYPE_TO_CLASS" xsi:type="string" _delta="define"><![CDATA[]]></constant>
  12. <constant id="PORTAL_USERREQUEST_PUBLIC_LOG" xsi:type="string" _delta="define"><![CDATA[ticket_log]]></constant>
  13. <constant id="PORTAL_USERREQUEST_USER_COMMENT" xsi:type="string" _delta="define"><![CDATA[user_commment]]></constant>
  14. <constant id="PORTAL_USERREQUEST_FORM_ATTRIBUTES" xsi:type="string" _delta="define"><![CDATA[title,description,impact,urgency,workgroup_id,ticket_log]]></constant>
  15. <constant id="PORTAL_USERREQUEST_TYPE" xsi:type="string" _delta="define"><![CDATA[]]></constant>
  16. <constant id="PORTAL_USERREQUEST_LIST_ZLIST" xsi:type="string" _delta="define"><![CDATA[finalclass,title,start_date,status,servicesubcategory_id,priority,caller_id]]></constant>
  17. <constant id="PORTAL_TICKETS_SEARCH_CRITERIA" xsi:type="string" _delta="define"><![CDATA[ref,start_date,close_date,service_id,caller_id]]></constant>
  18. <constant id="PORTAL_USERREQUEST_CLOSED_ZLIST" xsi:type="string" _delta="define"><![CDATA[title,start_date,close_date,servicesubcategory_id]]></constant>
  19. <constant id="PORTAL_USERREQUEST_DETAILS_ZLIST" xsi:type="string" _delta="define"><![CDATA[{"col:left":["ref","caller_id","servicesubcategory_id","title","description","solution"],"col:right":["status","priority","start_date","resolution_date","last_update","agent_id"]}]]></constant>
  20. </constants>
  21. <classes>
  22. <class id="UserRequest" _delta="define">
  23. <parent>ResponseTicket</parent>
  24. <properties>
  25. <comment><![CDATA[/**
  26. * Persistent classes for a CMDB
  27. *
  28. * @copyright Copyright (C) 2010-2012 Combodo SARL
  29. * @license http://opensource.org/licenses/AGPL-3.0
  30. */]]></comment>
  31. <category>bizmodel,searchable,requestmgmt</category>
  32. <abstract>false</abstract>
  33. <key_type>autoincrement</key_type>
  34. <db_table>ticket_request</db_table>
  35. <db_key_field>id</db_key_field>
  36. <db_final_class_field/>
  37. <naming>
  38. <format>%1$s</format>
  39. <attributes>
  40. <attribute id="ref"/>
  41. </attributes>
  42. </naming>
  43. <display_template/>
  44. <icon>images/user-request.png</icon>
  45. <reconciliation>
  46. <attributes>
  47. <attribute id="ref"/>
  48. </attributes>
  49. </reconciliation>
  50. <order>
  51. <columns>
  52. <column id="ref" order="0">
  53. <ascending>false</ascending>
  54. </column>
  55. </columns>
  56. </order>
  57. </properties>
  58. <fields>
  59. <field id="request_type" xsi:type="AttributeEnum">
  60. <values>
  61. <value>service request</value>
  62. <value>issue</value>
  63. <value>information</value>
  64. </values>
  65. <sql>request_type</sql>
  66. <default_value>service request</default_value>
  67. <is_null_allowed>false</is_null_allowed>
  68. </field>
  69. <field id="freeze_reason" xsi:type="AttributeString">
  70. <sql>freeze_reason</sql>
  71. <default_value/>
  72. <is_null_allowed>true</is_null_allowed>
  73. </field>
  74. </fields>
  75. <lifecycle>
  76. <attribute>status</attribute>
  77. <stimuli>
  78. <stimulus id="ev_assign" xsi:type="StimulusUserAction"/>
  79. <stimulus id="ev_reassign" xsi:type="StimulusUserAction"/>
  80. <stimulus id="ev_timeout" xsi:type="StimulusInternal"/>
  81. <stimulus id="ev_resolve" xsi:type="StimulusUserAction"/>
  82. <stimulus id="ev_close" xsi:type="StimulusUserAction"/>
  83. <stimulus id="ev_freeze" xsi:type="StimulusUserAction"/>
  84. </stimuli>
  85. <states>
  86. <state id="new">
  87. <flags>
  88. <attribute id="ref">
  89. <read_only/>
  90. </attribute>
  91. <attribute id="description">
  92. <must_change/>
  93. </attribute>
  94. <attribute id="start_date">
  95. <read_only/>
  96. </attribute>
  97. <attribute id="caller_id">
  98. <mandatory/>
  99. </attribute>
  100. <attribute id="org_id">
  101. <must_change/>
  102. </attribute>
  103. <attribute id="service_id">
  104. <must_change/>
  105. </attribute>
  106. <attribute id="servicesubcategory_id">
  107. <must_change/>
  108. </attribute>
  109. <attribute id="product">
  110. <must_prompt/>
  111. </attribute>
  112. <attribute id="impact">
  113. <must_change/>
  114. </attribute>
  115. <attribute id="urgency">
  116. <must_change/>
  117. </attribute>
  118. <attribute id="priority">
  119. <read_only/>
  120. </attribute>
  121. <attribute id="workgroup_id">
  122. <must_change/>
  123. </attribute>
  124. <attribute id="agent_email">
  125. <hidden/>
  126. </attribute>
  127. <attribute id="related_problem_id">
  128. <hidden/>
  129. </attribute>
  130. <attribute id="related_change_id">
  131. <hidden/>
  132. </attribute>
  133. <attribute id="close_date">
  134. <hidden/>
  135. </attribute>
  136. <attribute id="last_update">
  137. <read_only/>
  138. </attribute>
  139. <attribute id="assignment_date">
  140. <hidden/>
  141. </attribute>
  142. <attribute id="resolution_date">
  143. <hidden/>
  144. </attribute>
  145. <attribute id="tto_escalation_deadline">
  146. <read_only/>
  147. </attribute>
  148. <attribute id="ttr_escalation_deadline">
  149. <hidden/>
  150. </attribute>
  151. <attribute id="closure_deadline">
  152. <hidden/>
  153. </attribute>
  154. <attribute id="resolution_code">
  155. <hidden/>
  156. </attribute>
  157. <attribute id="solution">
  158. <hidden/>
  159. </attribute>
  160. <attribute id="user_satisfaction">
  161. <hidden/>
  162. </attribute>
  163. <attribute id="user_commment">
  164. <hidden/>
  165. </attribute>
  166. <attribute id="request_type">
  167. <mandatory/>
  168. </attribute>
  169. <attribute id="freeze_reason">
  170. <hidden/>
  171. </attribute>
  172. </flags>
  173. <transitions>
  174. <transition>
  175. <stimulus>ev_assign</stimulus>
  176. <target>assigned</target>
  177. <actions>
  178. <action>
  179. <verb>SetAssignedDate</verb>
  180. </action>
  181. </actions>
  182. </transition>
  183. <transition>
  184. <stimulus>ev_timeout</stimulus>
  185. <target>escalated_tto</target>
  186. <actions/>
  187. </transition>
  188. </transitions>
  189. </state>
  190. <state id="escalated_tto">
  191. <flags>
  192. <attribute id="ref">
  193. <read_only/>
  194. </attribute>
  195. <attribute id="start_date">
  196. <read_only/>
  197. </attribute>
  198. <attribute id="caller_id">
  199. <mandatory/>
  200. </attribute>
  201. <attribute id="priority">
  202. <read_only/>
  203. </attribute>
  204. <attribute id="agent_email">
  205. <hidden/>
  206. </attribute>
  207. <attribute id="related_problem_id">
  208. <hidden/>
  209. </attribute>
  210. <attribute id="related_change_id">
  211. <hidden/>
  212. </attribute>
  213. <attribute id="close_date">
  214. <hidden/>
  215. </attribute>
  216. <attribute id="last_update">
  217. <read_only/>
  218. </attribute>
  219. <attribute id="assignment_date">
  220. <hidden/>
  221. </attribute>
  222. <attribute id="resolution_date">
  223. <hidden/>
  224. </attribute>
  225. <attribute id="tto_escalation_deadline">
  226. <read_only/>
  227. </attribute>
  228. <attribute id="ttr_escalation_deadline">
  229. <hidden/>
  230. </attribute>
  231. <attribute id="closure_deadline">
  232. <hidden/>
  233. </attribute>
  234. <attribute id="resolution_code">
  235. <hidden/>
  236. </attribute>
  237. <attribute id="solution">
  238. <hidden/>
  239. </attribute>
  240. <attribute id="user_satisfaction">
  241. <hidden/>
  242. </attribute>
  243. <attribute id="user_commment">
  244. <hidden/>
  245. </attribute>
  246. <attribute id="request_type">
  247. <mandatory/>
  248. </attribute>
  249. <attribute id="freeze_reason">
  250. <hidden/>
  251. </attribute>
  252. </flags>
  253. <transitions>
  254. <transition>
  255. <stimulus>ev_assign</stimulus>
  256. <target>assigned</target>
  257. <actions>
  258. <action>
  259. <verb>SetAssignedDate</verb>
  260. </action>
  261. </actions>
  262. </transition>
  263. </transitions>
  264. </state>
  265. <state id="assigned">
  266. <flags>
  267. <attribute id="ref">
  268. <read_only/>
  269. </attribute>
  270. <attribute id="title">
  271. <read_only/>
  272. </attribute>
  273. <attribute id="description">
  274. <read_only/>
  275. </attribute>
  276. <attribute id="start_date">
  277. <read_only/>
  278. </attribute>
  279. <attribute id="caller_id">
  280. <read_only/>
  281. </attribute>
  282. <attribute id="org_id">
  283. <read_only/>
  284. </attribute>
  285. <attribute id="priority">
  286. <read_only/>
  287. </attribute>
  288. <attribute id="workgroup_id">
  289. <mandatory/>
  290. <must_prompt/>
  291. </attribute>
  292. <attribute id="agent_id">
  293. <mandatory/>
  294. <must_prompt/>
  295. </attribute>
  296. <attribute id="agent_email">
  297. <read_only/>
  298. </attribute>
  299. <attribute id="close_date">
  300. <hidden/>
  301. </attribute>
  302. <attribute id="last_update">
  303. <read_only/>
  304. </attribute>
  305. <attribute id="assignment_date">
  306. <hidden/>
  307. </attribute>
  308. <attribute id="resolution_date">
  309. <hidden/>
  310. </attribute>
  311. <attribute id="tto_escalation_deadline">
  312. <hidden/>
  313. </attribute>
  314. <attribute id="ttr_escalation_deadline">
  315. <read_only/>
  316. </attribute>
  317. <attribute id="closure_deadline">
  318. <hidden/>
  319. </attribute>
  320. <attribute id="resolution_code">
  321. <hidden/>
  322. </attribute>
  323. <attribute id="solution">
  324. <hidden/>
  325. </attribute>
  326. <attribute id="user_satisfaction">
  327. <hidden/>
  328. </attribute>
  329. <attribute id="user_commment">
  330. <hidden/>
  331. </attribute>
  332. <attribute id="request_type">
  333. <mandatory/>
  334. </attribute>
  335. <attribute id="freeze_reason">
  336. <hidden/>
  337. </attribute>
  338. </flags>
  339. <transitions>
  340. <transition>
  341. <stimulus>ev_reassign</stimulus>
  342. <target>assigned</target>
  343. <actions/>
  344. </transition>
  345. <transition>
  346. <stimulus>ev_timeout</stimulus>
  347. <target>escalated_ttr</target>
  348. <actions/>
  349. </transition>
  350. <transition>
  351. <stimulus>ev_resolve</stimulus>
  352. <target>resolved</target>
  353. <actions>
  354. <action>
  355. <verb>SetResolveDate</verb>
  356. </action>
  357. <action>
  358. <verb>SetClosureDeadline</verb>
  359. </action>
  360. </actions>
  361. </transition>
  362. <transition>
  363. <stimulus>ev_freeze</stimulus>
  364. <target>frozen</target>
  365. <actions/>
  366. </transition>
  367. </transitions>
  368. </state>
  369. <state id="escalated_ttr">
  370. <flags>
  371. <attribute id="ref">
  372. <read_only/>
  373. </attribute>
  374. <attribute id="title">
  375. <read_only/>
  376. </attribute>
  377. <attribute id="description">
  378. <read_only/>
  379. </attribute>
  380. <attribute id="start_date">
  381. <read_only/>
  382. </attribute>
  383. <attribute id="caller_id">
  384. <read_only/>
  385. </attribute>
  386. <attribute id="org_id">
  387. <read_only/>
  388. </attribute>
  389. <attribute id="priority">
  390. <read_only/>
  391. </attribute>
  392. <attribute id="workgroup_id">
  393. <mandatory/>
  394. <must_prompt/>
  395. </attribute>
  396. <attribute id="agent_id">
  397. <mandatory/>
  398. <must_prompt/>
  399. </attribute>
  400. <attribute id="agent_email">
  401. <read_only/>
  402. </attribute>
  403. <attribute id="close_date">
  404. <hidden/>
  405. </attribute>
  406. <attribute id="last_update">
  407. <read_only/>
  408. </attribute>
  409. <attribute id="assignment_date">
  410. <hidden/>
  411. </attribute>
  412. <attribute id="resolution_date">
  413. <hidden/>
  414. </attribute>
  415. <attribute id="tto_escalation_deadline">
  416. <hidden/>
  417. </attribute>
  418. <attribute id="ttr_escalation_deadline">
  419. <read_only/>
  420. </attribute>
  421. <attribute id="closure_deadline">
  422. <hidden/>
  423. </attribute>
  424. <attribute id="resolution_code">
  425. <hidden/>
  426. </attribute>
  427. <attribute id="solution">
  428. <hidden/>
  429. </attribute>
  430. <attribute id="user_satisfaction">
  431. <hidden/>
  432. </attribute>
  433. <attribute id="user_commment">
  434. <hidden/>
  435. </attribute>
  436. <attribute id="request_type">
  437. <mandatory/>
  438. </attribute>
  439. <attribute id="freeze_reason">
  440. <hidden/>
  441. </attribute>
  442. </flags>
  443. <transitions>
  444. <transition>
  445. <stimulus>ev_reassign</stimulus>
  446. <target>escalated_ttr</target>
  447. <actions/>
  448. </transition>
  449. <transition>
  450. <stimulus>ev_resolve</stimulus>
  451. <target>resolved</target>
  452. <actions>
  453. <action>
  454. <verb>SetResolveDate</verb>
  455. </action>
  456. <action>
  457. <verb>SetClosureDeadline</verb>
  458. </action>
  459. </actions>
  460. </transition>
  461. </transitions>
  462. </state>
  463. <state id="frozen">
  464. <flags>
  465. <attribute id="ref">
  466. <read_only/>
  467. </attribute>
  468. <attribute id="title">
  469. <read_only/>
  470. </attribute>
  471. <attribute id="description">
  472. <read_only/>
  473. </attribute>
  474. <attribute id="start_date">
  475. <read_only/>
  476. </attribute>
  477. <attribute id="caller_id">
  478. <read_only/>
  479. </attribute>
  480. <attribute id="org_id">
  481. <read_only/>
  482. </attribute>
  483. <attribute id="priority">
  484. <read_only/>
  485. </attribute>
  486. <attribute id="workgroup_id">
  487. <mandatory/>
  488. </attribute>
  489. <attribute id="agent_id">
  490. <mandatory/>
  491. </attribute>
  492. <attribute id="agent_email">
  493. <read_only/>
  494. </attribute>
  495. <attribute id="close_date">
  496. <hidden/>
  497. </attribute>
  498. <attribute id="last_update">
  499. <read_only/>
  500. </attribute>
  501. <attribute id="assignment_date">
  502. <hidden/>
  503. </attribute>
  504. <attribute id="resolution_date">
  505. <hidden/>
  506. </attribute>
  507. <attribute id="tto_escalation_deadline">
  508. <hidden/>
  509. </attribute>
  510. <attribute id="ttr_escalation_deadline">
  511. <read_only/>
  512. </attribute>
  513. <attribute id="closure_deadline">
  514. <hidden/>
  515. </attribute>
  516. <attribute id="resolution_code">
  517. <hidden/>
  518. </attribute>
  519. <attribute id="solution">
  520. <hidden/>
  521. </attribute>
  522. <attribute id="user_satisfaction">
  523. <hidden/>
  524. </attribute>
  525. <attribute id="user_commment">
  526. <hidden/>
  527. </attribute>
  528. <attribute id="request_type">
  529. <mandatory/>
  530. </attribute>
  531. <attribute id="freeze_reason">
  532. <mandatory/>
  533. <must_prompt/>
  534. </attribute>
  535. </flags>
  536. <transitions>
  537. <transition>
  538. <stimulus>ev_timeout</stimulus>
  539. <target>escalated_ttr</target>
  540. <actions/>
  541. </transition>
  542. <transition>
  543. <stimulus>ev_assign</stimulus>
  544. <target>assigned</target>
  545. <actions/>
  546. </transition>
  547. <transition>
  548. <stimulus>ev_resolve</stimulus>
  549. <target>resolved</target>
  550. <actions/>
  551. </transition>
  552. </transitions>
  553. </state>
  554. <state id="resolved">
  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="service_id">
  575. <read_only/>
  576. </attribute>
  577. <attribute id="servicesubcategory_id">
  578. <read_only/>
  579. </attribute>
  580. <attribute id="product">
  581. <read_only/>
  582. </attribute>
  583. <attribute id="impact">
  584. <read_only/>
  585. </attribute>
  586. <attribute id="urgency">
  587. <read_only/>
  588. </attribute>
  589. <attribute id="priority">
  590. <read_only/>
  591. </attribute>
  592. <attribute id="workgroup_id">
  593. <read_only/>
  594. </attribute>
  595. <attribute id="agent_id">
  596. <read_only/>
  597. </attribute>
  598. <attribute id="agent_email">
  599. <read_only/>
  600. </attribute>
  601. <attribute id="close_date">
  602. <hidden/>
  603. </attribute>
  604. <attribute id="last_update">
  605. <read_only/>
  606. </attribute>
  607. <attribute id="assignment_date">
  608. <hidden/>
  609. </attribute>
  610. <attribute id="resolution_date">
  611. <hidden/>
  612. </attribute>
  613. <attribute id="tto_escalation_deadline">
  614. <hidden/>
  615. </attribute>
  616. <attribute id="ttr_escalation_deadline">
  617. <hidden/>
  618. </attribute>
  619. <attribute id="closure_deadline">
  620. <read_only/>
  621. </attribute>
  622. <attribute id="resolution_code">
  623. <must_prompt/>
  624. </attribute>
  625. <attribute id="solution">
  626. <must_prompt/>
  627. </attribute>
  628. <attribute id="user_satisfaction">
  629. <hidden/>
  630. </attribute>
  631. <attribute id="user_commment">
  632. <hidden/>
  633. </attribute>
  634. <attribute id="request_type">
  635. <mandatory/>
  636. </attribute>
  637. <attribute id="freeze_reason">
  638. <hidden/>
  639. </attribute>
  640. </flags>
  641. <transitions>
  642. <transition>
  643. <stimulus>ev_reassign</stimulus>
  644. <target>assigned</target>
  645. <actions/>
  646. </transition>
  647. <transition>
  648. <stimulus>ev_close</stimulus>
  649. <target>closed</target>
  650. <actions>
  651. <action>
  652. <verb>SetClosureDate</verb>
  653. </action>
  654. </actions>
  655. </transition>
  656. </transitions>
  657. </state>
  658. <state id="closed">
  659. <flags>
  660. <attribute id="ref">
  661. <read_only/>
  662. </attribute>
  663. <attribute id="title">
  664. <read_only/>
  665. </attribute>
  666. <attribute id="description">
  667. <read_only/>
  668. </attribute>
  669. <attribute id="ticket_log">
  670. <read_only/>
  671. </attribute>
  672. <attribute id="start_date">
  673. <read_only/>
  674. </attribute>
  675. <attribute id="caller_id">
  676. <read_only/>
  677. </attribute>
  678. <attribute id="org_id">
  679. <read_only/>
  680. </attribute>
  681. <attribute id="service_id">
  682. <read_only/>
  683. </attribute>
  684. <attribute id="servicesubcategory_id">
  685. <read_only/>
  686. </attribute>
  687. <attribute id="product">
  688. <read_only/>
  689. </attribute>
  690. <attribute id="impact">
  691. <read_only/>
  692. </attribute>
  693. <attribute id="urgency">
  694. <read_only/>
  695. </attribute>
  696. <attribute id="priority">
  697. <read_only/>
  698. </attribute>
  699. <attribute id="workgroup_id">
  700. <read_only/>
  701. </attribute>
  702. <attribute id="agent_id">
  703. <read_only/>
  704. </attribute>
  705. <attribute id="agent_email">
  706. <read_only/>
  707. </attribute>
  708. <attribute id="close_date">
  709. <read_only/>
  710. </attribute>
  711. <attribute id="last_update">
  712. <read_only/>
  713. </attribute>
  714. <attribute id="assignment_date">
  715. <hidden/>
  716. </attribute>
  717. <attribute id="resolution_date">
  718. <hidden/>
  719. </attribute>
  720. <attribute id="tto_escalation_deadline">
  721. <hidden/>
  722. </attribute>
  723. <attribute id="ttr_escalation_deadline">
  724. <hidden/>
  725. </attribute>
  726. <attribute id="closure_deadline">
  727. <hidden/>
  728. </attribute>
  729. <attribute id="resolution_code">
  730. <read_only/>
  731. </attribute>
  732. <attribute id="solution">
  733. <read_only/>
  734. </attribute>
  735. <attribute id="user_satisfaction">
  736. <must_prompt/>
  737. </attribute>
  738. <attribute id="user_commment">
  739. <must_prompt/>
  740. </attribute>
  741. <attribute id="request_type">
  742. <read_only/>
  743. </attribute>
  744. <attribute id="freeze_reason">
  745. <hidden/>
  746. </attribute>
  747. </flags>
  748. <transitions/>
  749. </state>
  750. </states>
  751. </lifecycle>
  752. <methods>
  753. <method id="ComputeValues">
  754. <static>false</static>
  755. <access>public</access>
  756. <type>Overload-DBObject</type>
  757. <code><![CDATA[ public function ComputeValues()
  758. {
  759. $sCurrRef = $this->Get('ref');
  760. if (strlen($sCurrRef) == 0)
  761. {
  762. $iKey = $this->GetKey();
  763. if ($iKey < 0)
  764. {
  765. // Object not yet in the Database
  766. $iKey = MetaModel::GetNextKey(get_class($this));
  767. }
  768. $sName = sprintf('R-%06d', $iKey);
  769. $this->Set('ref', $sName);
  770. }
  771. return parent::ComputeValues();
  772. }]]></code>
  773. </method>
  774. <method id="GetIcon">
  775. <comment>/**
  776. * Get the icon representing this object
  777. * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)
  778. * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file
  779. */</comment>
  780. <static>false</static>
  781. <access>public</access>
  782. <type>Overload-DBObject</type>
  783. <code><![CDATA[ public function GetIcon($bImgTag = true)
  784. {
  785. $sStatus = $this->Get('status');
  786. switch($this->GetState())
  787. {
  788. case 'escalated_tto':
  789. case 'escalated_ttr':
  790. $sIcon = self::MakeIconFromName('user-request-escalated.png');
  791. break;
  792. case 'resolved':
  793. case 'closed':
  794. $sIcon = self::MakeIconFromName('user-request-closed.png');
  795. break;
  796. case 'new':
  797. $sIcon = self::MakeIconFromName('user-request.png');
  798. $oEscalationDeadline = $this->Get('tto_escalation_deadline');
  799. if ($oEscalationDeadline != null)
  800. {
  801. // A SLA is running
  802. $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
  803. $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
  804. $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
  805. if ($ratio <= 0)
  806. {
  807. $sIcon = self::MakeIconFromName('user-request-escalated.png');
  808. }
  809. else if ($ratio <= 0.25)
  810. {
  811. $sIcon = self::MakeIconFromName('user-request-deadline.png');
  812. }
  813. }
  814. break;
  815. case 'assigned':
  816. $sIcon = self::MakeIconFromName('user-request.png');
  817. $oEscalationDeadline = $this->Get('ttr_escalation_deadline');
  818. if ($oEscalationDeadline != null)
  819. {
  820. // A SLA is running
  821. $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
  822. $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
  823. $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
  824. if ($ratio <= 0)
  825. {
  826. $sIcon = self::MakeIconFromName('user-request-escalated.png');
  827. }
  828. else if ($ratio <= 0.25)
  829. {
  830. $sIcon = self::MakeIconFromName('user-request-deadline.png');
  831. }
  832. }
  833. break;
  834. default:
  835. $sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
  836. }
  837. return $sIcon;
  838. }]]></code>
  839. </method>
  840. <method id="MakeIconFromName">
  841. <static>true</static>
  842. <access>protected</access>
  843. <type>Overload-DBObject</type>
  844. <code><![CDATA[ protected static function MakeIconFromName($sIconName, $bImgTag = true)
  845. {
  846. $sIcon = '';
  847. if ($sIconName != '')
  848. {
  849. $sPath = utils::GetAbsoluteUrlModulesRoot().'itop-request-mgmt-1.0.0/images/'.$sIconName;
  850. if ($bImgTag)
  851. {
  852. $sIcon = "<img src=\"$sPath\" style=\"vertical-align:middle;\"/>";
  853. }
  854. else
  855. {
  856. $sIcon = $sPath;
  857. }
  858. }
  859. return $sIcon;
  860. }]]></code>
  861. </method>
  862. </methods>
  863. <presentation>
  864. <details>
  865. <items>
  866. <item id="document_list">
  867. <rank>10</rank>
  868. </item>
  869. <item id="ci_list">
  870. <rank>20</rank>
  871. </item>
  872. <item id="contact_list">
  873. <rank>30</rank>
  874. </item>
  875. <item id="incident_list">
  876. <rank>40</rank>
  877. </item>
  878. <item id="col:col1">
  879. <rank>50</rank>
  880. <items>
  881. <item id="fieldset:Ticket:baseinfo">
  882. <rank>10</rank>
  883. <items>
  884. <item id="ref">
  885. <rank>10</rank>
  886. </item>
  887. <item id="title">
  888. <rank>20</rank>
  889. </item>
  890. <item id="org_id">
  891. <rank>30</rank>
  892. </item>
  893. <item id="status">
  894. <rank>40</rank>
  895. </item>
  896. <item id="priority">
  897. <rank>50</rank>
  898. </item>
  899. <item id="request_type">
  900. <rank>60</rank>
  901. </item>
  902. <item id="service_id">
  903. <rank>70</rank>
  904. </item>
  905. <item id="servicesubcategory_id">
  906. <rank>80</rank>
  907. </item>
  908. <item id="product">
  909. <rank>90</rank>
  910. </item>
  911. </items>
  912. </item>
  913. <item id="fieldset:Ticket:moreinfo">
  914. <rank>20</rank>
  915. <items>
  916. <item id="impact">
  917. <rank>10</rank>
  918. </item>
  919. <item id="urgency">
  920. <rank>20</rank>
  921. </item>
  922. <item id="description">
  923. <rank>30</rank>
  924. </item>
  925. <item id="resolution_code">
  926. <rank>40</rank>
  927. </item>
  928. <item id="solution">
  929. <rank>50</rank>
  930. </item>
  931. <item id="user_satisfaction">
  932. <rank>60</rank>
  933. </item>
  934. <item id="user_commment">
  935. <rank>70</rank>
  936. </item>
  937. <item id="freeze_reason">
  938. <rank>80</rank>
  939. </item>
  940. </items>
  941. </item>
  942. </items>
  943. </item>
  944. <item id="col:col2">
  945. <rank>60</rank>
  946. <items>
  947. <item id="fieldset:Ticket:date">
  948. <rank>10</rank>
  949. <items>
  950. <item id="start_date">
  951. <rank>10</rank>
  952. </item>
  953. <item id="last_update">
  954. <rank>20</rank>
  955. </item>
  956. <item id="assignment_date">
  957. <rank>30</rank>
  958. </item>
  959. <item id="tto_escalation_deadline">
  960. <rank>40</rank>
  961. </item>
  962. <item id="ttr_escalation_deadline">
  963. <rank>50</rank>
  964. </item>
  965. <item id="close_date">
  966. <rank>60</rank>
  967. </item>
  968. <item id="closure_deadline">
  969. <rank>70</rank>
  970. </item>
  971. </items>
  972. </item>
  973. <item id="fieldset:Ticket:contact">
  974. <rank>20</rank>
  975. <items>
  976. <item id="caller_id">
  977. <rank>10</rank>
  978. </item>
  979. <item id="workgroup_id">
  980. <rank>20</rank>
  981. </item>
  982. <item id="agent_id">
  983. <rank>30</rank>
  984. </item>
  985. </items>
  986. </item>
  987. <item id="fieldset:Ticket:relation">
  988. <rank>30</rank>
  989. <items>
  990. <item id="related_problem_id">
  991. <rank>10</rank>
  992. </item>
  993. <item id="related_change_id">
  994. <rank>20</rank>
  995. </item>
  996. </items>
  997. </item>
  998. </items>
  999. </item>
  1000. </items>
  1001. </details>
  1002. <search>
  1003. <items>
  1004. <item id="ref">
  1005. <rank>10</rank>
  1006. </item>
  1007. <item id="title">
  1008. <rank>20</rank>
  1009. </item>
  1010. <item id="org_id">
  1011. <rank>30</rank>
  1012. </item>
  1013. <item id="request_type">
  1014. <rank>40</rank>
  1015. </item>
  1016. <item id="start_date">
  1017. <rank>50</rank>
  1018. </item>
  1019. <item id="status">
  1020. <rank>60</rank>
  1021. </item>
  1022. <item id="caller_id">
  1023. <rank>70</rank>
  1024. </item>
  1025. <item id="service_id">
  1026. <rank>80</rank>
  1027. </item>
  1028. <item id="servicesubcategory_id">
  1029. <rank>90</rank>
  1030. </item>
  1031. <item id="product">
  1032. <rank>100</rank>
  1033. </item>
  1034. <item id="impact">
  1035. <rank>110</rank>
  1036. </item>
  1037. <item id="urgency">
  1038. <rank>120</rank>
  1039. </item>
  1040. <item id="priority">
  1041. <rank>130</rank>
  1042. </item>
  1043. <item id="workgroup_id">
  1044. <rank>140</rank>
  1045. </item>
  1046. <item id="agent_id">
  1047. <rank>150</rank>
  1048. </item>
  1049. <item id="agent_email">
  1050. <rank>160</rank>
  1051. </item>
  1052. <item id="close_date">
  1053. <rank>170</rank>
  1054. </item>
  1055. <item id="resolution_code">
  1056. <rank>180</rank>
  1057. </item>
  1058. <item id="solution">
  1059. <rank>190</rank>
  1060. </item>
  1061. <item id="user_satisfaction">
  1062. <rank>200</rank>
  1063. </item>
  1064. <item id="user_commment">
  1065. <rank>210</rank>
  1066. </item>
  1067. </items>
  1068. </search>
  1069. <list>
  1070. <items>
  1071. <item id="title">
  1072. <rank>10</rank>
  1073. </item>
  1074. <item id="org_id">
  1075. <rank>20</rank>
  1076. </item>
  1077. <item id="start_date">
  1078. <rank>30</rank>
  1079. </item>
  1080. <item id="status">
  1081. <rank>40</rank>
  1082. </item>
  1083. <item id="service_id">
  1084. <rank>50</rank>
  1085. </item>
  1086. <item id="priority">
  1087. <rank>60</rank>
  1088. </item>
  1089. <item id="workgroup_id">
  1090. <rank>70</rank>
  1091. </item>
  1092. <item id="agent_id">
  1093. <rank>80</rank>
  1094. </item>
  1095. </items>
  1096. </list>
  1097. </presentation>
  1098. </class>
  1099. </classes>
  1100. <menus>
  1101. <menu id="RequestManagement" xsi:type="MenuGroup" _delta="define">
  1102. <rank>30</rank>
  1103. </menu>
  1104. <menu id="UserRequest:Overview" xsi:type="DashboardMenuNode" _delta="define">
  1105. <rank>0</rank>
  1106. <parent>RequestManagement</parent>
  1107. <definition>
  1108. <title>UI:RequestMgmtMenuOverview:Title</title>
  1109. <layout>DashboardLayoutTwoCols</layout>
  1110. <cells>
  1111. <cell id="0">
  1112. <rank>0</rank>
  1113. <dashlets>
  1114. <dashlet id="1" xsi:type="DashletGroupByBars">
  1115. <rank>0</rank>
  1116. <title>UI-RequestManagementOverview-RequestByService</title>
  1117. <query>SELECT UserRequest</query>
  1118. <group_by>service_id</group_by>
  1119. <style>bars</style>
  1120. </dashlet>
  1121. </dashlets>
  1122. </cell>
  1123. <cell id="1">
  1124. <rank>1</rank>
  1125. <dashlets>
  1126. <dashlet id="2" xsi:type="DashletGroupByPie">
  1127. <rank>0</rank>
  1128. <title>UI-RequestManagementOverview-RequestByPriority</title>
  1129. <query>SELECT UserRequest</query>
  1130. <group_by>priority</group_by>
  1131. <style>pie</style>
  1132. </dashlet>
  1133. </dashlets>
  1134. </cell>
  1135. <cell id="2">
  1136. <rank>2</rank>
  1137. <dashlets>
  1138. <dashlet id="3" xsi:type="DashletObjectList">
  1139. <rank>0</rank>
  1140. <title>UI-RequestManagementOverview-RequestUnassigned</title>
  1141. <query>SELECT UserRequest WHERE status IN ("new", "escalated_tto")</query>
  1142. </dashlet>
  1143. </dashlets>
  1144. </cell>
  1145. </cells>
  1146. </definition>
  1147. </menu>
  1148. <menu id="NewUserRequest" xsi:type="NewObjectMenuNode" _delta="define">
  1149. <rank>1</rank>
  1150. <parent>RequestManagement</parent>
  1151. <class>UserRequest</class>
  1152. </menu>
  1153. <menu id="SearchUserRequests" xsi:type="SearchMenuNode" _delta="define">
  1154. <rank>2</rank>
  1155. <parent>RequestManagement</parent>
  1156. <class>UserRequest</class>
  1157. </menu>
  1158. <menu id="UserRequest:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
  1159. <rank>3</rank>
  1160. <parent>RequestManagement</parent>
  1161. <template_file/>
  1162. </menu>
  1163. <menu id="UserRequest:MyRequests" xsi:type="OQLMenuNode" _delta="define">
  1164. <rank>1</rank>
  1165. <parent>UserRequest:Shortcuts</parent>
  1166. <oql><![CDATA[SELECT UserRequest WHERE agent_id = :current_contact_id AND status NOT IN ("closed","resolved")]]></oql>
  1167. <do_search/>
  1168. <auto_reload>fast</auto_reload>
  1169. </menu>
  1170. <menu id="UserRequest:EscalatedRequests" xsi:type="OQLMenuNode" _delta="define">
  1171. <rank>2</rank>
  1172. <parent>UserRequest:Shortcuts</parent>
  1173. <oql><![CDATA[SELECT UserRequest WHERE status IN ("escalated_tto", "escalated_ttr")]]></oql>
  1174. <do_search/>
  1175. <auto_reload>fast</auto_reload>
  1176. </menu>
  1177. <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="define">
  1178. <rank>3</rank>
  1179. <parent>UserRequest:Shortcuts</parent>
  1180. <oql><![CDATA[SELECT UserRequest WHERE status IN ("new", "assigned", "escalated_tto", "escalated_ttr", "frozen", "resolved")]]></oql>
  1181. <do_search/>
  1182. <auto_reload>fast</auto_reload>
  1183. </menu>
  1184. </menus>
  1185. </itop_design>