datamodel.itop-request-mgmt.xml 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408
  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_USERREQUEST_PUBLIC_LOG" xsi:type="string" _delta="define"><![CDATA[public_log]]></constant>
  5. <constant id="PORTAL_USERREQUEST_USER_COMMENT" xsi:type="string" _delta="define"><![CDATA[user_comment]]></constant>
  6. <constant id="PORTAL_USERREQUEST_FORM_ATTRIBUTES" xsi:type="string" _delta="define"><![CDATA[title,description,impact,urgency]]></constant>
  7. <constant id="PORTAL_USERREQUEST_TYPE" xsi:type="string" _delta="define"><![CDATA[request_type]]></constant>
  8. <constant id="PORTAL_USERREQUEST_LIST_ZLIST" xsi:type="string" _delta="define"><![CDATA[finalclass,title,start_date,status,servicesubcategory_id,priority,caller_id]]></constant>
  9. <constant id="PORTAL_USERREQUEST_CLOSED_ZLIST" xsi:type="string" _delta="define"><![CDATA[title,start_date,close_date,servicesubcategory_id]]></constant>
  10. <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>
  11. <constant id="PORTAL_USERREQUEST_DISPLAY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT UserRequest WHERE org_id = :contact->org_id AND caller_id = :contact->id]]></constant>
  12. <constant id="PORTAL_USERREQUEST_DISPLAY_POWERUSER_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT UserRequest WHERE org_id = :contact->org_id]]></constant>
  13. </constants>
  14. <classes>
  15. <class id="UserRequest" _delta="define">
  16. <parent>Ticket</parent>
  17. <properties>
  18. <comment><![CDATA[/**
  19. * Persistent classes for a CMDB
  20. *
  21. * @copyright Copyright (C) 2010-2012 Combodo SARL
  22. * @license http://opensource.org/licenses/AGPL-3.0
  23. */]]></comment>
  24. <category>bizmodel,searchable,requestmgmt</category>
  25. <abstract>false</abstract>
  26. <key_type>autoincrement</key_type>
  27. <db_table>ticket_request</db_table>
  28. <db_key_field>id</db_key_field>
  29. <db_final_class_field/>
  30. <naming>
  31. <format>%1$s</format>
  32. <attributes>
  33. <attribute id="ref"/>
  34. </attributes>
  35. </naming>
  36. <display_template/>
  37. <icon>images/user-request.png</icon>
  38. <reconciliation>
  39. <attributes>
  40. <attribute id="ref"/>
  41. </attributes>
  42. </reconciliation>
  43. <order>
  44. <columns>
  45. <column id="ref" ascending="false"/>
  46. </columns>
  47. </order>
  48. </properties>
  49. <fields>
  50. <field id="status" xsi:type="AttributeEnum">
  51. <always_load_in_tables>true</always_load_in_tables>
  52. <values>
  53. <value>new</value>
  54. <value>waiting_for_approval</value>
  55. <value>approved</value>
  56. <value>rejected</value>
  57. <value>assigned</value>
  58. <value>pending</value>
  59. <value>escalated_tto</value>
  60. <value>escalated_ttr</value>
  61. <value>resolved</value>
  62. <value>closed</value>
  63. </values>
  64. <sql>status</sql>
  65. <default_value>new</default_value>
  66. <is_null_allowed>false</is_null_allowed>
  67. </field>
  68. <field id="request_type" xsi:type="AttributeEnum">
  69. <values>
  70. <value>incident</value>
  71. <value>service_request</value>
  72. </values>
  73. <sql>request_type</sql>
  74. <default_value>incident</default_value>
  75. <is_null_allowed>true</is_null_allowed>
  76. <display_style>list</display_style>
  77. </field>
  78. <field id="impact" xsi:type="AttributeEnum">
  79. <values>
  80. <value>1</value>
  81. <value>2</value>
  82. <value>3</value>
  83. </values>
  84. <sql>impact</sql>
  85. <default_value>1</default_value>
  86. <is_null_allowed>false</is_null_allowed>
  87. <display_style>list</display_style>
  88. </field>
  89. <field id="priority" xsi:type="AttributeEnum">
  90. <values>
  91. <value>1</value>
  92. <value>2</value>
  93. <value>3</value>
  94. <value>4</value>
  95. </values>
  96. <sql>priority</sql>
  97. <default_value>4</default_value>
  98. <is_null_allowed>false</is_null_allowed>
  99. </field>
  100. <field id="urgency" xsi:type="AttributeEnum">
  101. <values>
  102. <value>1</value>
  103. <value>2</value>
  104. <value>3</value>
  105. <value>4</value>
  106. </values>
  107. <sql>urgency</sql>
  108. <default_value>4</default_value>
  109. <is_null_allowed>false</is_null_allowed>
  110. </field>
  111. <field id="origin" xsi:type="AttributeEnum">
  112. <values>
  113. <value>mail</value>
  114. <value>phone</value>
  115. <value>portal</value>
  116. <value>monitoring</value>
  117. </values>
  118. <sql>origin</sql>
  119. <default_value>phone</default_value>
  120. <is_null_allowed>true</is_null_allowed>
  121. </field>
  122. <field id="approver_id" xsi:type="AttributeExternalKey">
  123. <filter><![CDATA[SELECT Person WHERE org_id= :this->org_id]]></filter>
  124. <dependencies>
  125. <attribute id="org_id"/>
  126. </dependencies>
  127. <sql>approver_id</sql>
  128. <target_class>Person</target_class>
  129. <is_null_allowed>true</is_null_allowed>
  130. <on_target_delete>DEL_MANUAL</on_target_delete>
  131. <allow_target_creation>false</allow_target_creation>
  132. <jointype/>
  133. </field>
  134. <field id="approver_email" xsi:type="AttributeExternalField">
  135. <extkey_attcode>approver_id</extkey_attcode>
  136. <target_attcode>email</target_attcode>
  137. <is_null_allowed>true</is_null_allowed>
  138. </field>
  139. <field id="service_id" xsi:type="AttributeExternalKey">
  140. <filter><![CDATA[SELECT Service AS s JOIN lnkCustomerContractToService AS l1 ON l1.service_id=s.id JOIN CustomerContract AS cc ON l1.customercontract_id=cc.id WHERE cc.org_id = :this->org_id AND s.status != 'obsolete']]></filter>
  141. <dependencies>
  142. <attribute id="org_id"/>
  143. </dependencies>
  144. <sql>service_id</sql>
  145. <target_class>Service</target_class>
  146. <is_null_allowed>true</is_null_allowed>
  147. <on_target_delete>DEL_MANUAL</on_target_delete>
  148. <allow_target_creation>false</allow_target_creation>
  149. <jointype/>
  150. </field>
  151. <field id="service_name" xsi:type="AttributeExternalField">
  152. <extkey_attcode>service_id</extkey_attcode>
  153. <target_attcode>name</target_attcode>
  154. <is_null_allowed>true</is_null_allowed>
  155. </field>
  156. <field id="servicesubcategory_id" xsi:type="AttributeExternalKey">
  157. <filter><![CDATA[SELECT ServiceSubcategory WHERE service_id = :this->service_id AND request_type = :this->request_type AND status != 'obsolete']]></filter>
  158. <dependencies>
  159. <attribute id="service_id"/>
  160. <attribute id="request_type"/>
  161. </dependencies>
  162. <sql>servicesubcategory_id</sql>
  163. <target_class>ServiceSubcategory</target_class>
  164. <is_null_allowed>true</is_null_allowed>
  165. <on_target_delete>DEL_MANUAL</on_target_delete>
  166. <allow_target_creation>false</allow_target_creation>
  167. <jointype/>
  168. </field>
  169. <field id="servicesubcategory_name" xsi:type="AttributeExternalField">
  170. <extkey_attcode>servicesubcategory_id</extkey_attcode>
  171. <target_attcode>name</target_attcode>
  172. <is_null_allowed>true</is_null_allowed>
  173. </field>
  174. <field id="escalation_flag" xsi:type="AttributeEnum">
  175. <values>
  176. <value>yes</value>
  177. <value>no</value>
  178. </values>
  179. <sql>escalation_flag</sql>
  180. <default_value>no</default_value>
  181. <is_null_allowed>true</is_null_allowed>
  182. </field>
  183. <field id="escalation_reason" xsi:type="AttributeString">
  184. <sql>escalation_reason</sql>
  185. <default_value/>
  186. <is_null_allowed>true</is_null_allowed>
  187. </field>
  188. <field id="assignment_date" xsi:type="AttributeDateTime">
  189. <sql>assignment_date</sql>
  190. <default_value/>
  191. <is_null_allowed>true</is_null_allowed>
  192. </field>
  193. <field id="resolution_date" xsi:type="AttributeDateTime">
  194. <sql>resolution_date</sql>
  195. <default_value/>
  196. <is_null_allowed>true</is_null_allowed>
  197. </field>
  198. <field id="last_pending_date" xsi:type="AttributeDateTime">
  199. <sql>last_pending_date</sql>
  200. <default_value/>
  201. <is_null_allowed>true</is_null_allowed>
  202. </field>
  203. <field id="cumulatedpending" xsi:type="AttributeStopWatch">
  204. <states>
  205. <state id="pending"/>
  206. </states>
  207. <working_time/>
  208. <thresholds/>
  209. <goal/>
  210. </field>
  211. <field id="tto" xsi:type="AttributeStopWatch">
  212. <always_load_in_tables>true</always_load_in_tables>
  213. <states>
  214. <state id="new"/>
  215. <state id="escalated_tto"/>
  216. </states>
  217. <working_time/>
  218. <goal>ResponseTicketTTO</goal>
  219. <thresholds>
  220. <threshold>
  221. <percent>75</percent>
  222. <actions>
  223. </actions>
  224. </threshold>
  225. <threshold>
  226. <percent>100</percent>
  227. <actions>
  228. <action>
  229. <verb>ApplyStimulus</verb>
  230. <params>
  231. <param>ev_timeout</param>
  232. </params>
  233. </action>
  234. </actions>
  235. </threshold>
  236. </thresholds>
  237. </field>
  238. <field id="ttr" xsi:type="AttributeStopWatch">
  239. <always_load_in_tables>true</always_load_in_tables>
  240. <states>
  241. <state id="new"/>
  242. <state id="escalated_tto"/>
  243. <state id="assigned"/>
  244. <state id="approved"/>
  245. <state id="escalated_ttr"/>
  246. </states>
  247. <working_time/>
  248. <goal>ResponseTicketTTR</goal>
  249. <thresholds>
  250. <threshold>
  251. <percent>75</percent>
  252. <actions>
  253. </actions>
  254. </threshold>
  255. <threshold>
  256. <percent>100</percent>
  257. <actions>
  258. <action>
  259. <verb>ApplyStimulus</verb>
  260. <params>
  261. <param>ev_timeout</param>
  262. </params>
  263. </action>
  264. </actions>
  265. </threshold>
  266. </thresholds>
  267. </field>
  268. <field id="tto_escalation_deadline" xsi:type="AttributeSubItem">
  269. <target_attcode>tto</target_attcode>
  270. <item_code>100_deadline</item_code>
  271. </field>
  272. <field id="sla_tto_passed" xsi:type="AttributeSubItem">
  273. <target_attcode>tto</target_attcode>
  274. <item_code>100_triggered</item_code>
  275. </field>
  276. <field id="sla_tto_over" xsi:type="AttributeSubItem">
  277. <target_attcode>tto</target_attcode>
  278. <item_code>100_overrun</item_code>
  279. </field>
  280. <field id="ttr_escalation_deadline" xsi:type="AttributeSubItem">
  281. <target_attcode>ttr</target_attcode>
  282. <item_code>100_deadline</item_code>
  283. </field>
  284. <field id="sla_ttr_passed" xsi:type="AttributeSubItem">
  285. <target_attcode>ttr</target_attcode>
  286. <item_code>100_triggered</item_code>
  287. </field>
  288. <field id="sla_ttr_over" xsi:type="AttributeSubItem">
  289. <target_attcode>ttr</target_attcode>
  290. <item_code>100_overrun</item_code>
  291. </field>
  292. <field id="time_spent" xsi:type="AttributeDuration">
  293. <sql>time_spent</sql>
  294. <default_value/>
  295. <is_null_allowed>true</is_null_allowed>
  296. </field>
  297. <field id="resolution_code" xsi:type="AttributeEnum">
  298. <values>
  299. <value>assistance</value>
  300. <value>other</value>
  301. <value>software patch</value>
  302. <value>training</value>
  303. <value>hardware repair</value>
  304. <value>system update</value>
  305. <value>bug fixed</value>
  306. </values>
  307. <sql>resolution_code</sql>
  308. <default_value>assistance</default_value>
  309. <is_null_allowed>true</is_null_allowed>
  310. </field>
  311. <field id="solution" xsi:type="AttributeText">
  312. <sql>solution</sql>
  313. <default_value/>
  314. <is_null_allowed>true</is_null_allowed>
  315. </field>
  316. <field id="pending_reason" xsi:type="AttributeText">
  317. <sql>pending_reason</sql>
  318. <default_value/>
  319. <is_null_allowed>true</is_null_allowed>
  320. </field>
  321. <field id="parent_request_id" xsi:type="AttributeExternalKey">
  322. <filter><![CDATA[SELECT UserRequest WHERE id != :this->id AND status NOT IN ('rejected','resolved','closed')]]></filter>
  323. <dependencies>
  324. </dependencies>
  325. <sql>parent_request_id</sql>
  326. <target_class>UserRequest</target_class>
  327. <is_null_allowed>true</is_null_allowed>
  328. <on_target_delete>DEL_MANUAL</on_target_delete>
  329. <jointype/>
  330. </field>
  331. <field id="parent_request_ref" xsi:type="AttributeExternalField">
  332. <extkey_attcode>parent_request_id</extkey_attcode>
  333. <target_attcode>ref</target_attcode>
  334. <is_null_allowed>true</is_null_allowed>
  335. </field>
  336. <field id="parent_problem_id" xsi:type="AttributeExternalKey">
  337. <sql>parent_problem_id</sql>
  338. <target_class>Problem</target_class>
  339. <is_null_allowed>true</is_null_allowed>
  340. <on_target_delete>DEL_MANUAL</on_target_delete>
  341. <jointype/>
  342. </field>
  343. <field id="parent_problem_ref" xsi:type="AttributeExternalField">
  344. <extkey_attcode>parent_problem_id</extkey_attcode>
  345. <target_attcode>ref</target_attcode>
  346. <is_null_allowed>true</is_null_allowed>
  347. </field>
  348. <field id="parent_change_id" xsi:type="AttributeExternalKey">
  349. <filter><![CDATA[SELECT Change WHERE status != "closed"]]></filter>
  350. <sql>parent_change_id</sql>
  351. <target_class>Change</target_class>
  352. <is_null_allowed>true</is_null_allowed>
  353. <on_target_delete>DEL_MANUAL</on_target_delete>
  354. <jointype/>
  355. </field>
  356. <field id="parent_change_ref" xsi:type="AttributeExternalField">
  357. <extkey_attcode>parent_change_id</extkey_attcode>
  358. <target_attcode>ref</target_attcode>
  359. <is_null_allowed>true</is_null_allowed>
  360. </field>
  361. <field id="related_request_list" xsi:type="AttributeLinkedSet">
  362. <linked_class>UserRequest</linked_class>
  363. <ext_key_to_me>parent_request_id</ext_key_to_me>
  364. <edit_mode>add_remove</edit_mode>
  365. <count_min>0</count_min>
  366. <count_max>0</count_max>
  367. </field>
  368. <field id="public_log" xsi:type="AttributeCaseLog">
  369. <sql>public_log</sql>
  370. <default_value/>
  371. <is_null_allowed>true</is_null_allowed>
  372. </field>
  373. <field id="user_satisfaction" xsi:type="AttributeEnum">
  374. <values>
  375. <value>1</value>
  376. <value>2</value>
  377. <value>3</value>
  378. <value>4</value>
  379. </values>
  380. <sql>user_satisfaction</sql>
  381. <default_value>1</default_value>
  382. <is_null_allowed>true</is_null_allowed>
  383. </field>
  384. <field id="user_comment" xsi:type="AttributeText">
  385. <sql>user_commment</sql>
  386. <default_value/>
  387. <is_null_allowed>true</is_null_allowed>
  388. </field>
  389. </fields>
  390. <lifecycle>
  391. <attribute>status</attribute>
  392. <stimuli>
  393. <stimulus id="ev_assign" xsi:type="StimulusUserAction"/>
  394. <stimulus id="ev_reassign" xsi:type="StimulusUserAction"/>
  395. <stimulus id="ev_approve" xsi:type="StimulusUserAction"/>
  396. <stimulus id="ev_reject" xsi:type="StimulusUserAction"/>
  397. <stimulus id="ev_pending" xsi:type="StimulusUserAction"/>
  398. <stimulus id="ev_timeout" xsi:type="StimulusInternal"/>
  399. <stimulus id="ev_autoresolve" xsi:type="StimulusInternal"/>
  400. <stimulus id="ev_autoclose" xsi:type="StimulusInternal"/>
  401. <stimulus id="ev_resolve" xsi:type="StimulusUserAction"/>
  402. <stimulus id="ev_close" xsi:type="StimulusUserAction"/>
  403. <stimulus id="ev_reopen" xsi:type="StimulusUserAction"/>
  404. <stimulus id="ev_wait_for_approval" xsi:type="StimulusUserAction"/>
  405. </stimuli>
  406. <states>
  407. <state id="new">
  408. <flags>
  409. <attribute id="ref">
  410. <read_only/>
  411. </attribute>
  412. <attribute id="org_id">
  413. <mandatory/>
  414. </attribute>
  415. <attribute id="caller_id">
  416. <mandatory/>
  417. </attribute>
  418. <attribute id="team_id">
  419. <hidden/>
  420. </attribute>
  421. <attribute id="priority">
  422. <read_only/>
  423. </attribute>
  424. <attribute id="agent_id">
  425. <hidden/>
  426. </attribute>
  427. <attribute id="start_date">
  428. <read_only/>
  429. </attribute>
  430. <attribute id="last_update">
  431. <read_only/>
  432. </attribute>
  433. <attribute id="close_date">
  434. <hidden/>
  435. </attribute>
  436. <attribute id="approver_id">
  437. <hidden/>
  438. </attribute>
  439. <attribute id="escalation_flag">
  440. <hidden/>
  441. </attribute>
  442. <attribute id="escalation_reason">
  443. <hidden/>
  444. </attribute>
  445. <attribute id="assignment_date">
  446. <hidden/>
  447. </attribute>
  448. <attribute id="resolution_date">
  449. <hidden/>
  450. </attribute>
  451. <attribute id="last_pending_date">
  452. <hidden/>
  453. </attribute>
  454. <attribute id="time_spent">
  455. <hidden/>
  456. </attribute>
  457. <attribute id="resolution_code">
  458. <hidden/>
  459. </attribute>
  460. <attribute id="solution">
  461. <hidden/>
  462. </attribute>
  463. <attribute id="pending_reason">
  464. <hidden/>
  465. </attribute>
  466. <attribute id="user_satisfaction">
  467. <hidden/>
  468. </attribute>
  469. <attribute id="user_comment">
  470. <hidden/>
  471. </attribute>
  472. <attribute id="tto_escalation_deadline">
  473. <readonly/>
  474. </attribute>
  475. <attribute id="sla_tto_passed">
  476. <hidden/>
  477. </attribute>
  478. <attribute id="sla_tto_over">
  479. <hidden/>
  480. </attribute>
  481. <attribute id="sla_ttr_passed">
  482. <hidden/>
  483. </attribute>
  484. <attribute id="ttr_escalation_deadline">
  485. <hidden/>
  486. </attribute>
  487. <attribute id="sla_ttr_over">
  488. <hidden/>
  489. </attribute>
  490. </flags>
  491. <transitions>
  492. <transition>
  493. <stimulus>ev_assign</stimulus>
  494. <target>assigned</target>
  495. <actions>
  496. <action>
  497. <verb>SetAssignedDate</verb>
  498. </action>
  499. </actions>
  500. </transition>
  501. <transition>
  502. <stimulus>ev_timeout</stimulus>
  503. <target>escalated_tto</target>
  504. <actions/>
  505. </transition>
  506. <transition>
  507. <stimulus>ev_wait_for_approval</stimulus>
  508. <target>waiting_for_approval</target>
  509. <actions/>
  510. </transition>
  511. <transition>
  512. <stimulus>ev_autoresolve</stimulus>
  513. <target>resolved</target>
  514. <actions>
  515. <action>
  516. <verb>SetResolveDate</verb>
  517. </action>
  518. <action>
  519. <verb>resolveChilds</verb>
  520. </action>
  521. </actions>
  522. </transition>
  523. </transitions>
  524. </state>
  525. <state id="escalated_tto">
  526. <flags>
  527. <attribute id="ref">
  528. <read_only/>
  529. </attribute>
  530. <attribute id="org_id">
  531. <mandatory/>
  532. </attribute>
  533. <attribute id="caller_id">
  534. <mandatory/>
  535. </attribute>
  536. <attribute id="agent_id">
  537. <hidden/>
  538. </attribute>
  539. <attribute id="priority">
  540. <read_only/>
  541. </attribute>
  542. <attribute id="start_date">
  543. <read_only/>
  544. </attribute>
  545. <attribute id="last_update">
  546. <read_only/>
  547. </attribute>
  548. <attribute id="close_date">
  549. <hidden/>
  550. </attribute>
  551. <attribute id="approver_id">
  552. <hidden/>
  553. </attribute>
  554. <attribute id="escalation_flag">
  555. <hidden/>
  556. </attribute>
  557. <attribute id="escalation_reason">
  558. <hidden/>
  559. </attribute>
  560. <attribute id="assignment_date">
  561. <hidden/>
  562. </attribute>
  563. <attribute id="resolution_date">
  564. <hidden/>
  565. </attribute>
  566. <attribute id="last_pending_date">
  567. <hidden/>
  568. </attribute>
  569. <attribute id="time_spent">
  570. <hidden/>
  571. </attribute>
  572. <attribute id="resolution_code">
  573. <hidden/>
  574. </attribute>
  575. <attribute id="solution">
  576. <hidden/>
  577. </attribute>
  578. <attribute id="pending_reason">
  579. <hidden/>
  580. </attribute>
  581. <attribute id="user_satisfaction">
  582. <hidden/>
  583. </attribute>
  584. <attribute id="user_comment">
  585. <hidden/>
  586. </attribute>
  587. <attribute id="tto_escalation_deadline">
  588. <readonly/>
  589. </attribute>
  590. <attribute id="sla_tto_passed">
  591. <hidden/>
  592. </attribute>
  593. <attribute id="sla_tto_over">
  594. <hidden/>
  595. </attribute>
  596. <attribute id="sla_ttr_passed">
  597. <hidden/>
  598. </attribute>
  599. <attribute id="ttr_escalation_deadline">
  600. <hidden/>
  601. </attribute>
  602. <attribute id="sla_ttr_over">
  603. <hidden/>
  604. </attribute>
  605. </flags>
  606. <transitions>
  607. <transition>
  608. <stimulus>ev_assign</stimulus>
  609. <target>assigned</target>
  610. <actions>
  611. <action>
  612. <verb>SetAssignedDate</verb>
  613. </action>
  614. </actions>
  615. </transition>
  616. </transitions>
  617. </state>
  618. <state id="assigned">
  619. <flags>
  620. <attribute id="ref">
  621. <read_only/>
  622. </attribute>
  623. <attribute id="org_id">
  624. <mandatory/>
  625. </attribute>
  626. <attribute id="team_id">
  627. <mandatory/>
  628. <must_prompt/>
  629. </attribute>
  630. <attribute id="agent_id">
  631. <mandatory/>
  632. <must_prompt/>
  633. </attribute>
  634. <attribute id="priority">
  635. <read_only/>
  636. </attribute>
  637. <attribute id="start_date">
  638. <read_only/>
  639. </attribute>
  640. <attribute id="last_update">
  641. <read_only/>
  642. </attribute>
  643. <attribute id="close_date">
  644. <hidden/>
  645. </attribute>
  646. <attribute id="request_type">
  647. <mandatory/>
  648. </attribute>
  649. <attribute id="approver_id">
  650. <read_only/>
  651. </attribute>
  652. <attribute id="assignment_date">
  653. <read_only/>
  654. </attribute>
  655. <attribute id="resolution_date">
  656. <hidden/>
  657. </attribute>
  658. <attribute id="last_pending_date">
  659. <hidden/>
  660. </attribute>
  661. <attribute id="time_spent">
  662. <hidden/>
  663. </attribute>
  664. <attribute id="resolution_code">
  665. <hidden/>
  666. </attribute>
  667. <attribute id="solution">
  668. <hidden/>
  669. </attribute>
  670. <attribute id="pending_reason">
  671. <hidden/>
  672. </attribute>
  673. <attribute id="user_satisfaction">
  674. <hidden/>
  675. </attribute>
  676. <attribute id="user_comment">
  677. <hidden/>
  678. </attribute>
  679. <attribute id="tto_escalation_deadline">
  680. <hidden/>
  681. </attribute>
  682. <attribute id="sla_tto_passed">
  683. <readonly/>
  684. </attribute>
  685. <attribute id="sla_tto_over">
  686. <readonly/>
  687. </attribute>
  688. <attribute id="sla_ttr_passed">
  689. <hidden/>
  690. </attribute>
  691. <attribute id="ttr_escalation_deadline">
  692. <readonly/>
  693. </attribute>
  694. <attribute id="sla_ttr_over">
  695. <hidden/>
  696. </attribute>
  697. </flags>
  698. <transitions>
  699. <transition>
  700. <stimulus>ev_pending</stimulus>
  701. <target>pending</target>
  702. <actions>
  703. <action>
  704. <verb>SetLastPendingDate</verb>
  705. </action>
  706. </actions>
  707. </transition>
  708. <transition>
  709. <stimulus>ev_resolve</stimulus>
  710. <target>resolved</target>
  711. <actions>
  712. <action>
  713. <verb>SetResolveDate</verb>
  714. </action>
  715. <action>
  716. <verb>resolveChilds</verb>
  717. </action>
  718. </actions>
  719. </transition>
  720. <transition>
  721. <stimulus>ev_reassign</stimulus>
  722. <target>assigned</target>
  723. <actions/>
  724. </transition>
  725. <transition>
  726. <stimulus>ev_timeout</stimulus>
  727. <target>escalated_ttr</target>
  728. <actions/>
  729. </transition>
  730. <transition>
  731. <stimulus>ev_autoresolve</stimulus>
  732. <target>resolved</target>
  733. <actions>
  734. <action>
  735. <verb>SetResolveDate</verb>
  736. </action>
  737. <action>
  738. <verb>resolveChilds</verb>
  739. </action>
  740. </actions>
  741. </transition>
  742. </transitions>
  743. </state>
  744. <state id="escalated_ttr">
  745. <flags>
  746. <attribute id="ref">
  747. <read_only/>
  748. </attribute>
  749. <attribute id="org_id">
  750. <mandatory/>
  751. </attribute>
  752. <attribute id="team_id">
  753. <mandatory/>
  754. </attribute>
  755. <attribute id="agent_id">
  756. <mandatory/>
  757. </attribute>
  758. <attribute id="priority">
  759. <read_only/>
  760. </attribute>
  761. <attribute id="start_date">
  762. <read_only/>
  763. </attribute>
  764. <attribute id="last_update">
  765. <read_only/>
  766. </attribute>
  767. <attribute id="close_date">
  768. <hidden/>
  769. </attribute>
  770. <attribute id="request_type">
  771. <mandatory/>
  772. </attribute>
  773. <attribute id="approver_id">
  774. <read_only/>
  775. </attribute>
  776. <attribute id="assignment_date">
  777. <read_only/>
  778. </attribute>
  779. <attribute id="resolution_date">
  780. <hidden/>
  781. </attribute>
  782. <attribute id="last_pending_date">
  783. <hidden/>
  784. </attribute>
  785. <attribute id="time_spent">
  786. <hidden/>
  787. </attribute>
  788. <attribute id="resolution_code">
  789. <hidden/>
  790. </attribute>
  791. <attribute id="solution">
  792. <hidden/>
  793. </attribute>
  794. <attribute id="pending_reason">
  795. <hidden/>
  796. </attribute>
  797. <attribute id="user_satisfaction">
  798. <hidden/>
  799. </attribute>
  800. <attribute id="user_comment">
  801. <hidden/>
  802. </attribute>
  803. <attribute id="tto_escalation_deadline">
  804. <hidden/>
  805. </attribute>
  806. <attribute id="sla_tto_passed">
  807. <readonly/>
  808. </attribute>
  809. <attribute id="sla_tto_over">
  810. <readonly/>
  811. </attribute>
  812. <attribute id="sla_ttr_passed">
  813. <hidden/>
  814. </attribute>
  815. <attribute id="ttr_escalation_deadline">
  816. <readonly/>
  817. </attribute>
  818. <attribute id="sla_ttr_over">
  819. <hidden/>
  820. </attribute>
  821. </flags>
  822. <transitions>
  823. <transition>
  824. <stimulus>ev_pending</stimulus>
  825. <target>pending</target>
  826. <actions>
  827. <action>
  828. <verb>SetLastPendingDate</verb>
  829. </action>
  830. </actions>
  831. </transition>
  832. <transition>
  833. <stimulus>ev_resolve</stimulus>
  834. <target>resolved</target>
  835. <actions>
  836. <action>
  837. <verb>SetResolveDate</verb>
  838. </action>
  839. <action>
  840. <verb>resolveChilds</verb>
  841. </action>
  842. </actions>
  843. </transition>
  844. <transition>
  845. <stimulus>ev_reassign</stimulus>
  846. <target>assigned</target>
  847. <actions/>
  848. </transition>
  849. <transition>
  850. <stimulus>ev_autoresolve</stimulus>
  851. <target>resolved</target>
  852. <actions>
  853. <action>
  854. <verb>SetResolveDate</verb>
  855. </action>
  856. <action>
  857. <verb>resolveChilds</verb>
  858. </action>
  859. </actions>
  860. </transition>
  861. </transitions>
  862. </state>
  863. <state id="waiting_for_approval">
  864. <flags>
  865. <attribute id="ref">
  866. <read_only/>
  867. </attribute>
  868. <attribute id="org_id">
  869. <mandatory/>
  870. </attribute>
  871. <attribute id="caller_id">
  872. <mandatory/>
  873. </attribute>
  874. <attribute id="agent_id">
  875. <hidden/>
  876. </attribute>
  877. <attribute id="priority">
  878. <read_only/>
  879. </attribute>
  880. <attribute id="start_date">
  881. <read_only/>
  882. </attribute>
  883. <attribute id="last_update">
  884. <read_only/>
  885. </attribute>
  886. <attribute id="close_date">
  887. <hidden/>
  888. </attribute>
  889. <attribute id="approver_id">
  890. <must_prompt/>
  891. </attribute>
  892. <attribute id="escalation_flag">
  893. <hidden/>
  894. </attribute>
  895. <attribute id="escalation_reason">
  896. <hidden/>
  897. </attribute>
  898. <attribute id="assignment_date">
  899. <hidden/>
  900. </attribute>
  901. <attribute id="resolution_date">
  902. <hidden/>
  903. </attribute>
  904. <attribute id="last_pending_date">
  905. <hidden/>
  906. </attribute>
  907. <attribute id="time_spent">
  908. <hidden/>
  909. </attribute>
  910. <attribute id="resolution_code">
  911. <hidden/>
  912. </attribute>
  913. <attribute id="solution">
  914. <hidden/>
  915. </attribute>
  916. <attribute id="pending_reason">
  917. <hidden/>
  918. </attribute>
  919. <attribute id="user_satisfaction">
  920. <hidden/>
  921. </attribute>
  922. <attribute id="user_comment">
  923. <hidden/>
  924. </attribute>
  925. <attribute id="tto_escalation_deadline">
  926. <readonly/>
  927. </attribute>
  928. <attribute id="sla_tto_passed">
  929. <hidden/>
  930. </attribute>
  931. <attribute id="sla_tto_over">
  932. <hidden/>
  933. </attribute>
  934. <attribute id="sla_ttr_passed">
  935. <hidden/>
  936. </attribute>
  937. <attribute id="ttr_escalation_deadline">
  938. <hidden/>
  939. </attribute>
  940. <attribute id="sla_ttr_over">
  941. <hidden/>
  942. </attribute>
  943. </flags>
  944. <transitions>
  945. <transition>
  946. <stimulus>ev_approve</stimulus>
  947. <target>approved</target>
  948. <actions/>
  949. </transition>
  950. <transition>
  951. <stimulus>ev_reject</stimulus>
  952. <target>rejected</target>
  953. <actions/>
  954. </transition>
  955. </transitions>
  956. </state>
  957. <state id="approved">
  958. <flags>
  959. <attribute id="ref">
  960. <read_only/>
  961. </attribute>
  962. <attribute id="org_id">
  963. <mandatory/>
  964. </attribute>
  965. <attribute id="caller_id">
  966. <mandatory/>
  967. </attribute>
  968. <attribute id="agent_id">
  969. <hidden/>
  970. </attribute>
  971. <attribute id="priority">
  972. <read_only/>
  973. </attribute>
  974. <attribute id="start_date">
  975. <read_only/>
  976. </attribute>
  977. <attribute id="last_update">
  978. <read_only/>
  979. </attribute>
  980. <attribute id="close_date">
  981. <hidden/>
  982. </attribute>
  983. <attribute id="approver_id">
  984. <read_only/>
  985. </attribute>
  986. <attribute id="escalation_flag">
  987. <hidden/>
  988. </attribute>
  989. <attribute id="escalation_reason">
  990. <hidden/>
  991. </attribute>
  992. <attribute id="assignment_date">
  993. <hidden/>
  994. </attribute>
  995. <attribute id="resolution_date">
  996. <hidden/>
  997. </attribute>
  998. <attribute id="last_pending_date">
  999. <hidden/>
  1000. </attribute>
  1001. <attribute id="time_spent">
  1002. <hidden/>
  1003. </attribute>
  1004. <attribute id="resolution_code">
  1005. <hidden/>
  1006. </attribute>
  1007. <attribute id="solution">
  1008. <hidden/>
  1009. </attribute>
  1010. <attribute id="pending_reason">
  1011. <hidden/>
  1012. </attribute>
  1013. <attribute id="user_satisfaction">
  1014. <hidden/>
  1015. </attribute>
  1016. <attribute id="user_comment">
  1017. <hidden/>
  1018. </attribute>
  1019. <attribute id="tto_escalation_deadline">
  1020. <readonly/>
  1021. </attribute>
  1022. <attribute id="sla_tto_passed">
  1023. <hidden/>
  1024. </attribute>
  1025. <attribute id="sla_tto_over">
  1026. <hidden/>
  1027. </attribute>
  1028. <attribute id="sla_ttr_passed">
  1029. <hidden/>
  1030. </attribute>
  1031. <attribute id="ttr_escalation_deadline">
  1032. <hidden/>
  1033. </attribute>
  1034. <attribute id="sla_ttr_over">
  1035. <hidden/>
  1036. </attribute>
  1037. </flags>
  1038. <transitions>
  1039. <transition>
  1040. <stimulus>ev_timeout</stimulus>
  1041. <target>escalated_tto</target>
  1042. <actions/>
  1043. </transition>
  1044. <transition>
  1045. <stimulus>ev_assign</stimulus>
  1046. <target>assigned</target>
  1047. <actions>
  1048. <action>
  1049. <verb>SetAssignedDate</verb>
  1050. </action>
  1051. </actions>
  1052. </transition>
  1053. <transition>
  1054. <stimulus>ev_autoresolve</stimulus>
  1055. <target>resolved</target>
  1056. <actions>
  1057. <action>
  1058. <verb>SetResolveDate</verb>
  1059. </action>
  1060. <action>
  1061. <verb>resolveChilds</verb>
  1062. </action>
  1063. </actions>
  1064. </transition>
  1065. </transitions>
  1066. </state>
  1067. <state id="rejected">
  1068. <flags>
  1069. <attribute id="ref">
  1070. <read_only/>
  1071. </attribute>
  1072. <attribute id="org_id">
  1073. <mandatory/>
  1074. </attribute>
  1075. <attribute id="caller_id">
  1076. <mandatory/>
  1077. </attribute>
  1078. <attribute id="agent_id">
  1079. <hidden/>
  1080. </attribute>
  1081. <attribute id="priority">
  1082. <read_only/>
  1083. </attribute>
  1084. <attribute id="start_date">
  1085. <read_only/>
  1086. </attribute>
  1087. <attribute id="last_update">
  1088. <read_only/>
  1089. </attribute>
  1090. <attribute id="close_date">
  1091. <hidden/>
  1092. </attribute>
  1093. <attribute id="approver_id">
  1094. <hidden/>
  1095. </attribute>
  1096. <attribute id="escalation_flag">
  1097. <hidden/>
  1098. </attribute>
  1099. <attribute id="escalation_reason">
  1100. <hidden/>
  1101. </attribute>
  1102. <attribute id="assignment_date">
  1103. <hidden/>
  1104. </attribute>
  1105. <attribute id="resolution_date">
  1106. <hidden/>
  1107. </attribute>
  1108. <attribute id="last_pending_date">
  1109. <hidden/>
  1110. </attribute>
  1111. <attribute id="time_spent">
  1112. <hidden/>
  1113. </attribute>
  1114. <attribute id="resolution_code">
  1115. <hidden/>
  1116. </attribute>
  1117. <attribute id="solution">
  1118. <hidden/>
  1119. </attribute>
  1120. <attribute id="pending_reason">
  1121. <hidden/>
  1122. </attribute>
  1123. <attribute id="user_satisfaction">
  1124. <hidden/>
  1125. </attribute>
  1126. <attribute id="user_comment">
  1127. <hidden/>
  1128. </attribute>
  1129. <attribute id="tto_escalation_deadline">
  1130. <hidden/>
  1131. </attribute>
  1132. <attribute id="sla_tto_passed">
  1133. <hidden/>
  1134. </attribute>
  1135. <attribute id="sla_tto_over">
  1136. <hidden/>
  1137. </attribute>
  1138. <attribute id="sla_ttr_passed">
  1139. <hidden/>
  1140. </attribute>
  1141. <attribute id="ttr_escalation_deadline">
  1142. <hidden/>
  1143. </attribute>
  1144. <attribute id="sla_ttr_over">
  1145. <hidden/>
  1146. </attribute>
  1147. </flags>
  1148. <transitions>
  1149. <transition>
  1150. <stimulus>ev_reopen</stimulus>
  1151. <target>new</target>
  1152. <actions/>
  1153. </transition>
  1154. </transitions>
  1155. </state>
  1156. <state id="pending">
  1157. <flags>
  1158. <attribute id="ref">
  1159. <read_only/>
  1160. </attribute>
  1161. <attribute id="org_id">
  1162. <mandatory/>
  1163. </attribute>
  1164. <attribute id="team_id">
  1165. <mandatory/>
  1166. </attribute>
  1167. <attribute id="agent_id">
  1168. <mandatory/>
  1169. </attribute>
  1170. <attribute id="priority">
  1171. <read_only/>
  1172. </attribute>
  1173. <attribute id="start_date">
  1174. <read_only/>
  1175. </attribute>
  1176. <attribute id="last_update">
  1177. <read_only/>
  1178. </attribute>
  1179. <attribute id="close_date">
  1180. <hidden/>
  1181. </attribute>
  1182. <attribute id="request_type">
  1183. <mandatory/>
  1184. </attribute>
  1185. <attribute id="approver_id">
  1186. <read_only/>
  1187. </attribute>
  1188. <attribute id="assignment_date">
  1189. <read_only/>
  1190. </attribute>
  1191. <attribute id="resolution_date">
  1192. <hidden/>
  1193. </attribute>
  1194. <attribute id="last_pending_date">
  1195. <read_only/>
  1196. </attribute>
  1197. <attribute id="time_spent">
  1198. <hidden/>
  1199. </attribute>
  1200. <attribute id="resolution_code">
  1201. <hidden/>
  1202. </attribute>
  1203. <attribute id="solution">
  1204. <hidden/>
  1205. </attribute>
  1206. <attribute id="pending_reason">
  1207. <mandatory/>
  1208. <must_prompt/>
  1209. </attribute>
  1210. <attribute id="user_satisfaction">
  1211. <hidden/>
  1212. </attribute>
  1213. <attribute id="user_comment">
  1214. <hidden/>
  1215. </attribute>
  1216. <attribute id="tto_escalation_deadline">
  1217. <hidden/>
  1218. </attribute>
  1219. <attribute id="sla_tto_passed">
  1220. <readonly/>
  1221. </attribute>
  1222. <attribute id="sla_tto_over">
  1223. <readonly/>
  1224. </attribute>
  1225. <attribute id="sla_ttr_passed">
  1226. <hidden/>
  1227. </attribute>
  1228. <attribute id="ttr_escalation_deadline">
  1229. <hidden/>
  1230. </attribute>
  1231. <attribute id="sla_ttr_over">
  1232. <hidden/>
  1233. </attribute>
  1234. </flags>
  1235. <transitions>
  1236. <transition>
  1237. <stimulus>ev_assign</stimulus>
  1238. <target>assigned</target>
  1239. <actions>
  1240. </actions>
  1241. </transition>
  1242. <transition>
  1243. <stimulus>ev_autoresolve</stimulus>
  1244. <target>resolved</target>
  1245. <actions>
  1246. <action>
  1247. <verb>SetResolveDate</verb>
  1248. </action>
  1249. <action>
  1250. <verb>resolveChilds</verb>
  1251. </action>
  1252. </actions>
  1253. </transition>
  1254. </transitions>
  1255. </state>
  1256. <state id="resolved">
  1257. <flags>
  1258. <attribute id="ref">
  1259. <read_only/>
  1260. </attribute>
  1261. <attribute id="org_id">
  1262. <read_only/>
  1263. </attribute>
  1264. <attribute id="caller_id">
  1265. <read_only/>
  1266. </attribute>
  1267. <attribute id="origin">
  1268. <read_only/>
  1269. </attribute>
  1270. <attribute id="team_id">
  1271. <read_only/>
  1272. </attribute>
  1273. <attribute id="agent_id">
  1274. <read_only/>
  1275. </attribute>
  1276. <attribute id="impact">
  1277. <read_only/>
  1278. </attribute>
  1279. <attribute id="urgency">
  1280. <read_only/>
  1281. </attribute>
  1282. <attribute id="priority">
  1283. <read_only/>
  1284. </attribute>
  1285. <attribute id="start_date">
  1286. <read_only/>
  1287. </attribute>
  1288. <attribute id="last_update">
  1289. <read_only/>
  1290. </attribute>
  1291. <attribute id="close_date">
  1292. <hidden/>
  1293. </attribute>
  1294. <attribute id="request_type">
  1295. <read_only/>
  1296. </attribute>
  1297. <attribute id="approver_id">
  1298. <read_only/>
  1299. </attribute>
  1300. <attribute id="service_id">
  1301. <mandatory/>
  1302. <must_prompt/>
  1303. </attribute>
  1304. <attribute id="servicesubcategory_id">
  1305. <must_prompt/>
  1306. </attribute>
  1307. <attribute id="escalation_flag">
  1308. <read_only/>
  1309. </attribute>
  1310. <attribute id="escalation_reason">
  1311. <read_only/>
  1312. </attribute>
  1313. <attribute id="assignment_date">
  1314. <read_only/>
  1315. </attribute>
  1316. <attribute id="resolution_date">
  1317. <read_only/>
  1318. </attribute>
  1319. <attribute id="last_pending_date">
  1320. <hidden/>
  1321. </attribute>
  1322. <attribute id="time_spent">
  1323. <read_only/>
  1324. </attribute>
  1325. <attribute id="resolution_code">
  1326. <mandatory/>
  1327. <must_prompt/>
  1328. </attribute>
  1329. <attribute id="solution">
  1330. <mandatory/>
  1331. <must_prompt/>
  1332. </attribute>
  1333. <attribute id="pending_reason">
  1334. <read_only/>
  1335. </attribute>
  1336. <attribute id="user_satisfaction">
  1337. <hidden/>
  1338. </attribute>
  1339. <attribute id="user_comment">
  1340. <hidden/>
  1341. </attribute>
  1342. <attribute id="parent_request_id">
  1343. <read_only/>
  1344. </attribute>
  1345. <attribute id="parent_change_id">
  1346. <read_only/>
  1347. </attribute>
  1348. <attribute id="parent_problem_id">
  1349. <read_only/>
  1350. </attribute>
  1351. <attribute id="title">
  1352. <read_only/>
  1353. </attribute>
  1354. <attribute id="description">
  1355. <read_only/>
  1356. </attribute>
  1357. <attribute id="tto_escalation_deadline">
  1358. <hidden/>
  1359. </attribute>
  1360. <attribute id="sla_tto_passed">
  1361. <readonly/>
  1362. </attribute>
  1363. <attribute id="sla_tto_over">
  1364. <readonly/>
  1365. </attribute>
  1366. <attribute id="sla_ttr_passed">
  1367. <readonly/>
  1368. </attribute>
  1369. <attribute id="ttr_escalation_deadline">
  1370. <hidden/>
  1371. </attribute>
  1372. <attribute id="sla_ttr_over">
  1373. <readonly/>
  1374. </attribute>
  1375. </flags>
  1376. <transitions>
  1377. <transition>
  1378. <stimulus>ev_close</stimulus>
  1379. <target>closed</target>
  1380. <actions>
  1381. <action>
  1382. <verb>SetClosureDate</verb>
  1383. </action>
  1384. </actions>
  1385. </transition>
  1386. <transition>
  1387. <stimulus>ev_reopen</stimulus>
  1388. <target>assigned</target>
  1389. <actions>
  1390. </actions>
  1391. </transition>
  1392. <transition>
  1393. <stimulus>ev_autoresolve</stimulus>
  1394. <target>resolved</target>
  1395. <actions>
  1396. <action>
  1397. <verb>SetResolveDate</verb>
  1398. </action>
  1399. <action>
  1400. <verb>resolveChilds</verb>
  1401. </action>
  1402. </actions>
  1403. </transition>
  1404. </transitions>
  1405. </state>
  1406. <state id="closed">
  1407. <flags>
  1408. <attribute id="ref">
  1409. <read_only/>
  1410. </attribute>
  1411. <attribute id="org_id">
  1412. <read_only/>
  1413. </attribute>
  1414. <attribute id="caller_id">
  1415. <read_only/>
  1416. </attribute>
  1417. <attribute id="origin">
  1418. <read_only/>
  1419. </attribute>
  1420. <attribute id="team_id">
  1421. <read_only/>
  1422. </attribute>
  1423. <attribute id="agent_id">
  1424. <read_only/>
  1425. </attribute>
  1426. <attribute id="start_date">
  1427. <read_only/>
  1428. </attribute>
  1429. <attribute id="last_update">
  1430. <read_only/>
  1431. </attribute>
  1432. <attribute id="private_log">
  1433. <read_only/>
  1434. </attribute>
  1435. <attribute id="request_type">
  1436. <read_only/>
  1437. </attribute>
  1438. <attribute id="impact">
  1439. <read_only/>
  1440. </attribute>
  1441. <attribute id="urgency">
  1442. <read_only/>
  1443. </attribute>
  1444. <attribute id="priority">
  1445. <read_only/>
  1446. </attribute>
  1447. <attribute id="approver_id">
  1448. <read_only/>
  1449. </attribute>
  1450. <attribute id="service_id">
  1451. <read_only/>
  1452. </attribute>
  1453. <attribute id="servicesubcategory_id">
  1454. <read_only/>
  1455. </attribute>
  1456. <attribute id="escalation_flag">
  1457. <read_only/>
  1458. </attribute>
  1459. <attribute id="escalation_reason">
  1460. <read_only/>
  1461. </attribute>
  1462. <attribute id="assignment_date">
  1463. <read_only/>
  1464. </attribute>
  1465. <attribute id="resolution_date">
  1466. <read_only/>
  1467. </attribute>
  1468. <attribute id="close_date">
  1469. <read_only/>
  1470. </attribute>
  1471. <attribute id="last_pending_date">
  1472. <hidden/>
  1473. </attribute>
  1474. <attribute id="time_spent">
  1475. <read_only/>
  1476. </attribute>
  1477. <attribute id="resolution_code">
  1478. <read_only/>
  1479. </attribute>
  1480. <attribute id="solution">
  1481. <read_only/>
  1482. </attribute>
  1483. <attribute id="pending_reason">
  1484. <read_only/>
  1485. </attribute>
  1486. <attribute id="public_log">
  1487. <read_only/>
  1488. </attribute>
  1489. <attribute id="user_satisfaction">
  1490. <must_prompt/>
  1491. </attribute>
  1492. <attribute id="user_comment">
  1493. <must_prompt/>
  1494. </attribute>
  1495. <attribute id="pending_reason">
  1496. <read_only/>
  1497. </attribute>
  1498. <attribute id="parent_request_id">
  1499. <read_only/>
  1500. </attribute>
  1501. <attribute id="parent_change_id">
  1502. <read_only/>
  1503. </attribute>
  1504. <attribute id="parent_problem_id">
  1505. <read_only/>
  1506. </attribute>
  1507. <attribute id="title">
  1508. <read_only/>
  1509. </attribute>
  1510. <attribute id="description">
  1511. <read_only/>
  1512. </attribute>
  1513. <attribute id="tto_escalation_deadline">
  1514. <hidden/>
  1515. </attribute>
  1516. <attribute id="sla_tto_passed">
  1517. <read_only/>
  1518. </attribute>
  1519. <attribute id="sla_tto_over">
  1520. <read_only/>
  1521. </attribute>
  1522. <attribute id="sla_ttr_passed">
  1523. <read_only/>
  1524. </attribute>
  1525. <attribute id="ttr_escalation_deadline">
  1526. <hidden/>
  1527. </attribute>
  1528. <attribute id="sla_ttr_over">
  1529. <read_only/>
  1530. </attribute>
  1531. <attribute id="functionalcis_list">
  1532. <read_only/>
  1533. </attribute>
  1534. <attribute id="contacts_list">
  1535. <read_only/>
  1536. </attribute>
  1537. </flags>
  1538. <transitions/>
  1539. </state>
  1540. </states>
  1541. </lifecycle>
  1542. <methods>
  1543. <method id="SetAssignedDate">
  1544. <static>false</static>
  1545. <access>public</access>
  1546. <type>LifecycleAction</type>
  1547. <code><![CDATA[ public function SetAssignedDate($sStimulusCode)
  1548. {
  1549. $this->Set('assignment_date', time());
  1550. return true;
  1551. }]]></code>
  1552. </method>
  1553. <method id="SetLastPendingDate">
  1554. <static>false</static>
  1555. <access>public</access>
  1556. <type>LifecycleAction</type>
  1557. <code><![CDATA[ public function SetLastPendingDate($sStimulusCode)
  1558. {
  1559. $this->Set('last_pending_date', time());
  1560. return true;
  1561. }]]></code>
  1562. </method>
  1563. <method id="SetResolveDate">
  1564. <static>false</static>
  1565. <access>public</access>
  1566. <type>LifecycleAction</type>
  1567. <code><![CDATA[ public function SetResolveDate($sStimulusCode)
  1568. {
  1569. $this->Set('resolution_date', time());
  1570. $iTimeSpent = time() - AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
  1571. $this->Set('time_spent', $iTimeSpent);
  1572. return true;
  1573. }]]></code>
  1574. </method>
  1575. <method id="SetClosureDate">
  1576. <static>false</static>
  1577. <access>public</access>
  1578. <type>LifecycleAction</type>
  1579. <code><![CDATA[ public function SetClosureDate($sStimulusCode)
  1580. {
  1581. $this->Set('close_date', time());
  1582. return true;
  1583. }]]></code>
  1584. </method>
  1585. <method id="SetApprover">
  1586. <static>false</static>
  1587. <access>public</access>
  1588. <type>LifecycleAction</type>
  1589. <code><![CDATA[ public function SetApprover($sStimulusCode)
  1590. {
  1591. $this->Set('approver_id', UserRights::GetUserId());
  1592. return true;
  1593. }]]></code>
  1594. </method>
  1595. <method id="DoCheckToWrite">
  1596. <static>false</static>
  1597. <access>public</access>
  1598. <type>Overload-DBObject</type>
  1599. <code><![CDATA[public function DoCheckToWrite()
  1600. {
  1601. parent::DoCheckToWrite();
  1602. if (!$this->IsNew() && ($this->Get('parent_request_id') == $this->GetKey()))
  1603. {
  1604. $this->m_aCheckIssues[] = Dict::Format('Class:UserRequest/Error:CannotAssignParentRequestIdToSelf');
  1605. }
  1606. }]]></code>
  1607. </method>
  1608. <method id="ComputePriority">
  1609. <comment>/** Compute the priority of the ticket based on its impact and urgency&#13;
  1610. * @return integer The priority of the ticket 1(high) .. 3(low)&#13;
  1611. */</comment>
  1612. <static>false</static>
  1613. <access>public</access>
  1614. <type>LifecycleAction</type>
  1615. <code><![CDATA[ public function ComputePriority()
  1616. {
  1617. // priority[impact][urgency]
  1618. $aPriorities = array(
  1619. // single person
  1620. 1 => array(
  1621. 1 => 1,
  1622. 2 => 1,
  1623. 3 => 2,
  1624. 4 => 4,
  1625. ),
  1626. // a group
  1627. 2 => array(
  1628. 1 => 1,
  1629. 2 => 2,
  1630. 3 => 3,
  1631. 4 => 4,
  1632. ),
  1633. // a departement!
  1634. 3 => array(
  1635. 1 => 2,
  1636. 2 => 3,
  1637. 3 => 3,
  1638. 4 => 4,
  1639. ),
  1640. );
  1641. $iPriority = $aPriorities[(int)$this->Get('impact')][(int)$this->Get('urgency')];
  1642. return $iPriority;
  1643. }]]></code>
  1644. </method>
  1645. <method id="ComputeValues">
  1646. <static>false</static>
  1647. <access>public</access>
  1648. <type>Overload-DBObject</type>
  1649. <code><![CDATA[ public function ComputeValues()
  1650. {
  1651. // Compute the priority of the ticket
  1652. $this->Set('priority', $this->ComputePriority());
  1653. return parent::ComputeValues();
  1654. }]]></code>
  1655. </method>
  1656. <method id="DisplayBareRelations">
  1657. <static>false</static>
  1658. <access>public</access>
  1659. <type>Overload-cmdbAbstractObject</type>
  1660. <code><![CDATA[ function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
  1661. {
  1662. parent::DisplayBareRelations($oPage, $bEditMode);
  1663. if (!$bEditMode)
  1664. {
  1665. if (MetaModel::IsValidClass('KnownError'))
  1666. {
  1667. //Search for known errors
  1668. $oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
  1669. $iTicketID = $this->GetKey();;
  1670. $oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT KnownError AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID"));
  1671. $iNumberKE=$oKnownErrorSet->count();
  1672. if ($iNumberKE > 0)
  1673. {
  1674. $oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)");
  1675. }
  1676. else
  1677. {
  1678. $oPage->SetCurrentTab(Dict::S('Class:UserRequest:KnownErrorList'));
  1679. }
  1680. self::DisplaySet($oPage, $oKnownErrorSet, array ('menu' => false));
  1681. }
  1682. }
  1683. }]]></code>
  1684. </method>
  1685. <method id="GetIcon">
  1686. <comment>/**&#13;
  1687. * Get the icon representing this object&#13;
  1688. * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)&#13;
  1689. * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file&#13;
  1690. */</comment>
  1691. <static>false</static>
  1692. <access>public</access>
  1693. <type>Overload-DBObject</type>
  1694. <code><![CDATA[ public function GetIcon($bImgTag = true)
  1695. {
  1696. $sStatus = $this->Get('status');
  1697. switch($this->GetState())
  1698. {
  1699. case 'escalated_tto':
  1700. case 'escalated_ttr':
  1701. $sIcon = self::MakeIconFromName('user-request-escalated.png');
  1702. break;
  1703. case 'resolved':
  1704. case 'closed':
  1705. $sIcon = self::MakeIconFromName('user-request-closed.png');
  1706. break;
  1707. case 'new':
  1708. case 'approved':
  1709. $sIcon = self::MakeIconFromName('user-request.png');
  1710. $iEscalationDeadline = $this->Get('tto_escalation_deadline');
  1711. if ($iEscalationDeadline != null)
  1712. {
  1713. // A SLA is running
  1714. $oTTOStopWatch = $this->Get('tto');
  1715. if ($oTTOStopWatch->IsThresholdPassed(100))
  1716. {
  1717. $sIcon = self::MakeIconFromName('user-request-escalated.png');
  1718. }
  1719. else if ($oTTOStopWatch->IsThresholdPassed(75))
  1720. {
  1721. $sIcon = self::MakeIconFromName('user-request-deadline.png');
  1722. }
  1723. }
  1724. break;
  1725. case 'assigned':
  1726. $sIcon = self::MakeIconFromName('user-request.png');
  1727. $iEscalationDeadline = $this->Get('ttr_escalation_deadline');
  1728. if ($iEscalationDeadline != null)
  1729. {
  1730. // A SLA is running
  1731. $oTTRStopWatch = $this->Get('ttr');
  1732. if ($oTTRStopWatch->IsThresholdPassed(100))
  1733. {
  1734. $sIcon = self::MakeIconFromName('user-request-escalated.png');
  1735. }
  1736. else if ($oTTRStopWatch->IsThresholdPassed(75))
  1737. {
  1738. $sIcon = self::MakeIconFromName('user-request-deadline.png');
  1739. }
  1740. }
  1741. break;
  1742. default:
  1743. $sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
  1744. }
  1745. return $sIcon;
  1746. }]]></code>
  1747. </method>
  1748. <method id="MakeIconFromName">
  1749. <static>true</static>
  1750. <access>protected</access>
  1751. <type>Overload-DBObject</type>
  1752. <code><![CDATA[ protected static function MakeIconFromName($sIconName, $bImgTag = true)
  1753. {
  1754. $sIcon = '';
  1755. if ($sIconName != '')
  1756. {
  1757. $sPath = '../env-'.utils::GetCurrentEnvironment().'/itop-request-mgmt/images/'.$sIconName;
  1758. if ($bImgTag)
  1759. {
  1760. $sIcon = "<img src=\"$sPath\" style=\"vertical-align:middle;\"/>";
  1761. }
  1762. else
  1763. {
  1764. $sIcon = $sPath;
  1765. }
  1766. }
  1767. return $sIcon;
  1768. }]]></code>
  1769. </method>
  1770. <method id="GetHilightClass">
  1771. <static>false</static>
  1772. <access>public</access>
  1773. <type>Overload-iDisplay</type>
  1774. <code><![CDATA[ public function GetHilightClass()
  1775. {
  1776. $sHilightClass = '';
  1777. switch($this->GetState())
  1778. {
  1779. case 'new':
  1780. case 'approved':
  1781. $iEscalationDeadline = $this->Get('tto_escalation_deadline');
  1782. if ($iEscalationDeadline != null)
  1783. {
  1784. // A SLA is running
  1785. $oTTOStopWatch = $this->Get('tto');
  1786. if ($oTTOStopWatch->IsThresholdPassed(100))
  1787. {
  1788. $sHilightClass = HILIGHT_CLASS_CRITICAL;
  1789. }
  1790. else if ($oTTOStopWatch->IsThresholdPassed(75))
  1791. {
  1792. $sHilightClass = HILIGHT_CLASS_WARNING;
  1793. }
  1794. }
  1795. break;
  1796. case 'assigned':
  1797. $iEscalationDeadline = $this->Get('ttr_escalation_deadline');
  1798. if ($iEscalationDeadline != null)
  1799. {
  1800. // A SLA is running
  1801. $oTTRStopWatch = $this->Get('ttr');
  1802. if ($oTTRStopWatch->IsThresholdPassed(100))
  1803. {
  1804. $sHilightClass = HILIGHT_CLASS_CRITICAL;
  1805. }
  1806. else if ($oTTRStopWatch->IsThresholdPassed(75))
  1807. {
  1808. $sHilightClass = HILIGHT_CLASS_WARNING;
  1809. }
  1810. }
  1811. break;
  1812. case 'escalated_tto':
  1813. case 'escalated_ttr':
  1814. $sHilightClass = HILIGHT_CLASS_CRITICAL;
  1815. break;
  1816. }
  1817. return $sHilightClass;
  1818. }]]></code>
  1819. </method>
  1820. <method id="resolveChilds">
  1821. <static>false</static>
  1822. <access>public</access>
  1823. <type>LifecycleAction</type>
  1824. <code><![CDATA[ public function resolveChilds($sStimulusCode)
  1825. {
  1826. $sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
  1827. $oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
  1828. array(),
  1829. array(
  1830. 'ticket' => $this->GetKey(),
  1831. )
  1832. );
  1833. while($oRequest = $oChildRequestSet->Fetch())
  1834. {
  1835. if ( $oRequest->Get('status') != 'resolved')
  1836. {
  1837. $oRequest->set('servicesubcategory_id',$this->Get('servicesubcategory_id'));
  1838. $oRequest->set('service_id',$this->Get('service_id'));
  1839. $oRequest->set('team_id',$this->Get('team_id'));
  1840. $oRequest->set('agent_id',$this->Get('agent_id'));
  1841. $oRequest->set('resolution_code',$this->Get('resolution_code'));
  1842. $oRequest->set('solution','Automatically resolved by request:[[UserRequest:'.$this->Get('ref').']]');
  1843. $oRequest->ApplyStimulus('ev_autoresolve');
  1844. $oRequest->DBUpdate();
  1845. }
  1846. }
  1847. return true;
  1848. }]]></code>
  1849. </method>
  1850. <method id="UpdateChildRequestLog">
  1851. <static>false</static>
  1852. <access>public</access>
  1853. <type>LifecycleAction</type>
  1854. <code><![CDATA[ public function UpdateChildRequestLog()
  1855. {
  1856. $oLog = $this->Get('public_log');
  1857. $sLogPublic = $oLog->GetModifiedEntry();
  1858. if ($sLogPublic != '')
  1859. {
  1860. $sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
  1861. $oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
  1862. array(),
  1863. array(
  1864. 'ticket' => $this->GetKey(),
  1865. )
  1866. );
  1867. while($oRequest = $oChildRequestSet->Fetch())
  1868. {
  1869. $oRequest->set('public_log',$sLogPublic);
  1870. $oRequest->DBUpdate();
  1871. }
  1872. }
  1873. $oLog = $this->Get('private_log');
  1874. $sLogPrivate = $oLog->GetModifiedEntry();
  1875. if ($sLogPrivate != '')
  1876. {
  1877. $sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
  1878. $oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
  1879. array(),
  1880. array(
  1881. 'ticket' => $this->GetKey(),
  1882. )
  1883. );
  1884. while($oRequest = $oChildRequestSet->Fetch())
  1885. {
  1886. $oRequest->set('private_log',$sLogPrivate);
  1887. $oRequest->DBUpdate();
  1888. }
  1889. }
  1890. return true;
  1891. }]]></code>
  1892. </method>
  1893. <method id="ComputeImpactedItems">
  1894. <static>false</static>
  1895. <access>public</access>
  1896. <type>LifecycleAction</type>
  1897. <code><![CDATA[ public function ComputeImpactedItems()
  1898. {
  1899. $oToNotify = $this->Get('contacts_list');
  1900. $oToImpact = $this->Get('functionalcis_list');
  1901. $oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
  1902. $aComputed = $oImpactedInfras->GetRelatedObjects('impacts', 10);
  1903. if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
  1904. {
  1905. foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
  1906. {
  1907. $oNewLink = new lnkFunctionalCIToTicket();
  1908. $oNewLink->Set('functionalci_id', $iKey);
  1909. $oNewLink->Set('impact', 'potentially impacted (automatically computed)');
  1910. $oToImpact->AddObject($oNewLink);
  1911. }
  1912. }
  1913. if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
  1914. {
  1915. foreach($aComputed['Contact'] as $iKey => $oObject)
  1916. {
  1917. $oNewLink = new lnkContactToTicket();
  1918. $oNewLink->Set('contact_id', $iKey);
  1919. $oNewLink->Set('role', 'contact automatically computed');
  1920. $oToNotify->AddObject($oNewLink);
  1921. }
  1922. }
  1923. parent::OnInsert();
  1924. }]]></code>
  1925. </method>
  1926. <method id="OnInsert">
  1927. <static>false</static>
  1928. <access>protected</access>
  1929. <type>Overload-DBObject</type>
  1930. <code><![CDATA[ protected function OnInsert()
  1931. {
  1932. $this->ComputeImpactedItems();
  1933. $this->Set('last_update', time());
  1934. $this->Set('start_date', time());
  1935. }]]></code>
  1936. </method>
  1937. <method id="OnUpdate">
  1938. <static>false</static>
  1939. <access>protected</access>
  1940. <type>Overload-DBObject</type>
  1941. <code><![CDATA[ protected function OnUpdate()
  1942. {
  1943. $this->Set('last_update', time());
  1944. $this->UpdateChildRequestLog();
  1945. }]]></code>
  1946. </method>
  1947. </methods>
  1948. <presentation>
  1949. <details>
  1950. <items>
  1951. <item id="functionalcis_list">
  1952. <rank>10</rank>
  1953. </item>
  1954. <item id="contacts_list">
  1955. <rank>20</rank>
  1956. </item>
  1957. <item id="related_request_list">
  1958. <rank>30</rank>
  1959. </item>
  1960. <item id="workorders_list">
  1961. <rank>40</rank>
  1962. </item>
  1963. <item id="col:col1">
  1964. <rank>50</rank>
  1965. <items>
  1966. <item id="fieldset:Ticket:baseinfo">
  1967. <rank>10</rank>
  1968. <items>
  1969. <item id="org_id">
  1970. <rank>10</rank>
  1971. </item>
  1972. <item id="caller_id">
  1973. <rank>20</rank>
  1974. </item>
  1975. <item id="status">
  1976. <rank>30</rank>
  1977. </item>
  1978. <item id="origin">
  1979. <rank>40</rank>
  1980. </item>
  1981. <item id="title">
  1982. <rank>50</rank>
  1983. </item>
  1984. <item id="description">
  1985. <rank>60</rank>
  1986. </item>
  1987. </items>
  1988. </item>
  1989. <item id="fieldset:Ticket:moreinfo">
  1990. <rank>20</rank>
  1991. <items>
  1992. <item id="service_id">
  1993. <rank>10</rank>
  1994. </item>
  1995. <item id="servicesubcategory_id">
  1996. <rank>20</rank>
  1997. </item>
  1998. <item id="escalation_flag">
  1999. <rank>30</rank>
  2000. </item>
  2001. <item id="escalation_reason">
  2002. <rank>40</rank>
  2003. </item>
  2004. <item id="pending_reason">
  2005. <rank>50</rank>
  2006. </item>
  2007. </items>
  2008. </item>
  2009. </items>
  2010. </item>
  2011. <item id="col:col2">
  2012. <rank>60</rank>
  2013. <items>
  2014. <item id="fieldset:Ticket:Type">
  2015. <rank>10</rank>
  2016. <items>
  2017. <item id="request_type">
  2018. <rank>10</rank>
  2019. </item>
  2020. <item id="impact">
  2021. <rank>20</rank>
  2022. </item>
  2023. <item id="urgency">
  2024. <rank>30</rank>
  2025. </item>
  2026. <item id="priority">
  2027. <rank>40</rank>
  2028. </item>
  2029. </items>
  2030. </item>
  2031. <item id="fieldset:Ticket:contact">
  2032. <rank>20</rank>
  2033. <items>
  2034. <item id="team_id">
  2035. <rank>10</rank>
  2036. </item>
  2037. <item id="agent_id">
  2038. <rank>20</rank>
  2039. </item>
  2040. <item id="approver_id">
  2041. <rank>30</rank>
  2042. </item>
  2043. </items>
  2044. </item>
  2045. <item id="fieldset:Ticket:date">
  2046. <rank>30</rank>
  2047. <items>
  2048. <item id="start_date">
  2049. <rank>10</rank>
  2050. </item>
  2051. <item id="last_update">
  2052. <rank>20</rank>
  2053. </item>
  2054. <item id="assignment_date">
  2055. <rank>30</rank>
  2056. </item>
  2057. <item id="tto_escalation_deadline">
  2058. <rank>40</rank>
  2059. </item>
  2060. <item id="ttr_escalation_deadline">
  2061. <rank>50</rank>
  2062. </item>
  2063. <item id="last_pending_date">
  2064. <rank>60</rank>
  2065. </item>
  2066. <item id="resolution_date">
  2067. <rank>70</rank>
  2068. </item>
  2069. <item id="close_date">
  2070. <rank>80</rank>
  2071. </item>
  2072. </items>
  2073. </item>
  2074. </items>
  2075. </item>
  2076. <item id="col:col3">
  2077. <rank>70</rank>
  2078. <items>
  2079. <item id="fieldset:Ticket:relation">
  2080. <rank>10</rank>
  2081. <items>
  2082. <item id="parent_request_id">
  2083. <rank>10</rank>
  2084. </item>
  2085. <item id="parent_problem_id">
  2086. <rank>20</rank>
  2087. </item>
  2088. <item id="parent_change_id">
  2089. <rank>30</rank>
  2090. </item>
  2091. </items>
  2092. </item>
  2093. <item id="fieldset:Ticket:resolution">
  2094. <rank>20</rank>
  2095. <items>
  2096. <item id="resolution_code">
  2097. <rank>10</rank>
  2098. </item>
  2099. <item id="solution">
  2100. <rank>20</rank>
  2101. </item>
  2102. <item id="time_spent">
  2103. <rank>30</rank>
  2104. </item>
  2105. <item id="user_satisfaction">
  2106. <rank>40</rank>
  2107. </item>
  2108. <item id="user_comment">
  2109. <rank>50</rank>
  2110. </item>
  2111. </items>
  2112. </item>
  2113. <item id="fieldset:Ticket:SLA">
  2114. <rank>30</rank>
  2115. <items>
  2116. <item id="sla_tto_passed">
  2117. <rank>10</rank>
  2118. </item>
  2119. <item id="sla_tto_over">
  2120. <rank>20</rank>
  2121. </item>
  2122. <item id="sla_ttr_passed">
  2123. <rank>30</rank>
  2124. </item>
  2125. <item id="sla_ttr_over">
  2126. <rank>40</rank>
  2127. </item>
  2128. </items>
  2129. </item>
  2130. </items>
  2131. </item>
  2132. </items>
  2133. </details>
  2134. <search>
  2135. <items>
  2136. <item id="ref">
  2137. <rank>10</rank>
  2138. </item>
  2139. <item id="org_id">
  2140. <rank>20</rank>
  2141. </item>
  2142. <item id="title">
  2143. <rank>30</rank>
  2144. </item>
  2145. <item id="description">
  2146. <rank>40</rank>
  2147. </item>
  2148. <item id="start_date">
  2149. <rank>50</rank>
  2150. </item>
  2151. <item id="resolution_date">
  2152. <rank>70</rank>
  2153. </item>
  2154. <item id="close_date">
  2155. <rank>80</rank>
  2156. </item>
  2157. <item id="status">
  2158. <rank>90</rank>
  2159. </item>
  2160. <item id="caller_id">
  2161. <rank>100</rank>
  2162. </item>
  2163. <item id="origin">
  2164. <rank>110</rank>
  2165. </item>
  2166. <item id="request_type">
  2167. <rank>120</rank>
  2168. </item>
  2169. <item id="impact">
  2170. <rank>130</rank>
  2171. </item>
  2172. <item id="urgency">
  2173. <rank>140</rank>
  2174. </item>
  2175. <item id="priority">
  2176. <rank>150</rank>
  2177. </item>
  2178. <item id="service_id">
  2179. <rank>160</rank>
  2180. </item>
  2181. <item id="servicesubcategory_id">
  2182. <rank>170</rank>
  2183. </item>
  2184. <item id="team_id">
  2185. <rank>180</rank>
  2186. </item>
  2187. <item id="agent_id">
  2188. <rank>190</rank>
  2189. </item>
  2190. <item id="escalation_flag">
  2191. <rank>200</rank>
  2192. </item>
  2193. <item id="resolution_code">
  2194. <rank>210</rank>
  2195. </item>
  2196. <item id="user_satisfaction">
  2197. <rank>220</rank>
  2198. </item>
  2199. <item id="sla_tto_passed">
  2200. <rank>230</rank>
  2201. </item>
  2202. <item id="sla_ttr_passed">
  2203. <rank>240</rank>
  2204. </item>
  2205. </items>
  2206. </search>
  2207. <list>
  2208. <items>
  2209. <item id="title">
  2210. <rank>10</rank>
  2211. </item>
  2212. <item id="org_id">
  2213. <rank>20</rank>
  2214. </item>
  2215. <item id="caller_id">
  2216. <rank>30</rank>
  2217. </item>
  2218. <item id="start_date">
  2219. <rank>40</rank>
  2220. </item>
  2221. <item id="status">
  2222. <rank>50</rank>
  2223. </item>
  2224. <item id="agent_id">
  2225. <rank>60</rank>
  2226. </item>
  2227. </items>
  2228. </list>
  2229. </presentation>
  2230. </class>
  2231. </classes>
  2232. <menus>
  2233. <menu id="WelcomeMenuPage" xsi:type="DashboardMenuNode" _delta="must_exist">
  2234. <definition>
  2235. <cells>
  2236. <cell id="1" _delta="define">
  2237. <rank>1</rank>
  2238. <dashlets>
  2239. <dashlet id="9" xsi:type="DashletHeaderDynamic">
  2240. <rank>0</rank>
  2241. <title>Menu:RequestManagement</title>
  2242. <icon>itop-welcome-itil/images/user-request-deadline.png</icon>
  2243. <subtitle>Open Requests</subtitle>
  2244. <query>SELECT UserRequest WHERE status != "closed"</query>
  2245. <group_by>status</group_by>
  2246. <values>new,assigned,escalated_tto,escalated_ttr,resolved</values>
  2247. </dashlet>
  2248. <dashlet id="10" xsi:type="DashletObjectList">
  2249. <rank>1</rank>
  2250. <title>UI:WelcomeMenu:MyCalls</title>
  2251. <query>SELECT UserRequest AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved")</query>
  2252. <menu>true</menu>
  2253. </dashlet>
  2254. </dashlets>
  2255. </cell>
  2256. </cells>
  2257. </definition>
  2258. </menu>
  2259. <menu id="RequestManagement" xsi:type="MenuGroup" _delta="define">
  2260. <rank>30</rank>
  2261. <enable_stimulus/>
  2262. </menu>
  2263. <menu id="UserRequest:Overview" xsi:type="DashboardMenuNode" _delta="define">
  2264. <rank>0</rank>
  2265. <parent>RequestManagement</parent>
  2266. <definition>
  2267. <layout>DashboardLayoutTwoCols</layout>
  2268. <title>UI:RequestMgmtMenuOverview:Title</title>
  2269. <cells>
  2270. <cell id="0">
  2271. <rank>0</rank>
  2272. <dashlets>
  2273. <dashlet id="1" xsi:type="DashletGroupByPie">
  2274. <rank>0</rank>
  2275. <title>UI-RequestManagementOverview-RequestByType-last-14-days</title>
  2276. <query>SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) &lt; start_date</query>
  2277. <group_by>request_type</group_by>
  2278. <style>pie</style>
  2279. </dashlet>
  2280. </dashlets>
  2281. </cell>
  2282. <cell id="1">
  2283. <rank>1</rank>
  2284. <dashlets>
  2285. <dashlet id="2" xsi:type="DashletGroupByBars">
  2286. <rank>0</rank>
  2287. <title>UI-RequestManagementOverview-Last-14-days</title>
  2288. <query>SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) &lt; start_date</query>
  2289. <group_by>start_date:day_of_month</group_by>
  2290. <style>bars</style>
  2291. </dashlet>
  2292. </dashlets>
  2293. </cell>
  2294. <cell id="1">
  2295. <rank>2</rank>
  2296. <dashlets>
  2297. <dashlet id="3" xsi:type="DashletGroupByTable">
  2298. <rank>0</rank>
  2299. <title>UI-RequestManagementOverview-OpenRequestByStatus</title>
  2300. <query>SELECT UserRequest WHERE status NOT IN ('closed','rejected')</query>
  2301. <group_by>status</group_by>
  2302. <style>table</style>
  2303. </dashlet>
  2304. </dashlets>
  2305. </cell>
  2306. <cell id="2">
  2307. <rank>3</rank>
  2308. <dashlets>
  2309. <dashlet id="4" xsi:type="DashletGroupByTable">
  2310. <rank>0</rank>
  2311. <title>UI-RequestManagementOverview-OpenRequestByAgent</title>
  2312. <query>SELECT UserRequest WHERE status NOT IN ('closed','rejected')</query>
  2313. <group_by>agent_id</group_by>
  2314. <style>table</style>
  2315. </dashlet>
  2316. </dashlets>
  2317. </cell>
  2318. <cell id="3">
  2319. <rank>4</rank>
  2320. <dashlets>
  2321. <dashlet id="5" xsi:type="DashletGroupByTable">
  2322. <rank>0</rank>
  2323. <title>UI-RequestManagementOverview-OpenRequestByType</title>
  2324. <query>SELECT UserRequest WHERE status NOT IN ('closed','rejected')</query>
  2325. <group_by>finalclass</group_by>
  2326. <style>table</style>
  2327. </dashlet>
  2328. </dashlets>
  2329. </cell>
  2330. <cell id="4">
  2331. <rank>5</rank>
  2332. <dashlets>
  2333. <dashlet id="6" xsi:type="DashletGroupByTable">
  2334. <rank>0</rank>
  2335. <title>UI-RequestManagementOverview-OpenRequestByCustomer</title>
  2336. <query>SELECT UserRequest WHERE status NOT IN ('closed','rejected')</query>
  2337. <group_by>org_id</group_by>
  2338. <style>table</style>
  2339. </dashlet>
  2340. </dashlets>
  2341. </cell>
  2342. </cells>
  2343. </definition>
  2344. </menu>
  2345. <menu id="NewUserRequest" xsi:type="NewObjectMenuNode" _delta="define">
  2346. <rank>1</rank>
  2347. <parent>RequestManagement</parent>
  2348. <class>UserRequest</class>
  2349. </menu>
  2350. <menu id="SearchUserRequests" xsi:type="SearchMenuNode" _delta="define">
  2351. <rank>2</rank>
  2352. <parent>RequestManagement</parent>
  2353. <class>UserRequest</class>
  2354. </menu>
  2355. <menu id="UserRequest:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
  2356. <rank>3</rank>
  2357. <parent>RequestManagement</parent>
  2358. <template_file/>
  2359. </menu>
  2360. <menu id="UserRequest:MyRequests" xsi:type="OQLMenuNode" _delta="define">
  2361. <rank>0</rank>
  2362. <parent>UserRequest:Shortcuts</parent>
  2363. <oql><![CDATA[SELECT UserRequest WHERE agent_id = :current_contact_id AND status NOT IN ("closed","resolved")]]></oql>
  2364. <do_search/>
  2365. <auto_reload>fast</auto_reload>
  2366. </menu>
  2367. <menu id="UserRequest:EscalatedRequests" xsi:type="OQLMenuNode" _delta="define">
  2368. <rank>1</rank>
  2369. <parent>UserRequest:Shortcuts</parent>
  2370. <oql><![CDATA[SELECT UserRequest WHERE status IN ("escalated_tto", "escalated_ttr") OR escalation_flag="yes"]]></oql>
  2371. <do_search/>
  2372. <auto_reload>fast</auto_reload>
  2373. </menu>
  2374. <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="define">
  2375. <rank>2</rank>
  2376. <parent>UserRequest:Shortcuts</parent>
  2377. <oql><![CDATA[SELECT UserRequest WHERE status NOT IN ("closed")]]></oql>
  2378. <do_search>1</do_search>
  2379. <auto_reload>fast</auto_reload>
  2380. </menu>
  2381. <menu id="UserRequest:MySupportRequests" xsi:type="OQLMenuNode" _delta="define">
  2382. <rank>3</rank>
  2383. <parent>UserRequest:Shortcuts</parent>
  2384. <oql><![CDATA[SELECT UserRequest WHERE caller_id = :current_contact_id AND status NOT IN ("closed")]]></oql>
  2385. <do_search/>
  2386. <auto_reload>fast</auto_reload>
  2387. </menu>
  2388. </menus>
  2389. </itop_design>