datamodel.itop-request-mgmt-itil.xml 82 KB

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