datamodel.itop-request-mgmt.xml 41 KB

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