12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193 |
- <?xml version="1.0" encoding="UTF-8"?>
- <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
- <constants>
- <constant id="PORTAL_POWER_USER_PROFILE" xsi:type="string" _delta="define"><![CDATA[Portal power user]]></constant>
- <constant id="PORTAL_SERVICECATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT Service AS s JOIN SLA AS sla ON sla.service_id=s.id JOIN lnkContractToSLA AS ln ON ln.sla_id=sla.id JOIN CustomerContract AS cc ON ln.contract_id=cc.id WHERE cc.org_id = :org_id]]></constant>
- <constant id="PORTAL_SERVICE_SUBCATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT ServiceSubcategory WHERE service_id = :svc_id]]></constant>
- <constant id="PORTAL_VALIDATE_SERVICECATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT Service AS s JOIN SLA AS sla ON sla.service_id=s.id JOIN lnkContractToSLA AS ln ON ln.sla_id=sla.id JOIN CustomerContract AS cc ON ln.contract_id=cc.id WHERE cc.org_id = :org_id AND s.id = :id]]></constant>
- <constant id="PORTAL_VALIDATE_SERVICESUBCATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT ServiceSubcategory AS Sub JOIN Service AS Svc ON Sub.service_id = Svc.id WHERE Sub.id=:id]]></constant>
- <constant id="PORTAL_ALL_PARAMS" xsi:type="string" _delta="define"><![CDATA[from_service_id,org_id,caller_id,service_id,servicesubcategory_id,title,description,impact,urgency,workgroup_id,moreinfo,caller_id,start_date,end_date,duration,impact_duration]]></constant>
- <constant id="PORTAL_SET_TYPE_FROM" xsi:type="string" _delta="define"><![CDATA[]]></constant>
- <constant id="PORTAL_TYPE_TO_CLASS" xsi:type="string" _delta="define"><![CDATA[]]></constant>
- <constant id="PORTAL_USERREQUEST_PUBLIC_LOG" xsi:type="string" _delta="define"><![CDATA[ticket_log]]></constant>
- <constant id="PORTAL_USERREQUEST_USER_COMMENT" xsi:type="string" _delta="define"><![CDATA[user_commment]]></constant>
- <constant id="PORTAL_USERREQUEST_FORM_ATTRIBUTES" xsi:type="string" _delta="define"><![CDATA[title,description,impact,urgency,workgroup_id,ticket_log]]></constant>
- <constant id="PORTAL_USERREQUEST_TYPE" xsi:type="string" _delta="define"><![CDATA[]]></constant>
- <constant id="PORTAL_USERREQUEST_LIST_ZLIST" xsi:type="string" _delta="define"><![CDATA[finalclass,title,start_date,status,servicesubcategory_id,priority,caller_id]]></constant>
- <constant id="PORTAL_TICKETS_SEARCH_CRITERIA" xsi:type="string" _delta="define"><![CDATA[ref,start_date,close_date,service_id,caller_id]]></constant>
- <constant id="PORTAL_USERREQUEST_CLOSED_ZLIST" xsi:type="string" _delta="define"><![CDATA[title,start_date,close_date,servicesubcategory_id]]></constant>
- <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>
- <constant id="PORTAL_TICKETS_SEARCH_FILTER_service_id" xsi:type="string" _delta="define"><![CDATA[SELECT Service AS s JOIN SLA AS sla ON sla.service_id=s.id JOIN lnkContractToSLA AS ln ON ln.sla_id=sla.id JOIN CustomerContract AS cc ON ln.contract_id=cc.id WHERE cc.org_id = :org_id]]></constant>
- <constant id="PORTAL_TICKETS_SEARCH_FILTER_caller_id" xsi:type="string" _delta="define"><![CDATA[SELECT Person WHERE org_id = :org_id]]></constant>
- </constants>
- <classes>
- <class id="UserRequest" _delta="define">
- <parent>ResponseTicket</parent>
- <properties>
- <comment><![CDATA[/**
- * Persistent classes for a CMDB
- *
- * @copyright Copyright (C) 2010-2012 Combodo SARL
- * @license http://opensource.org/licenses/AGPL-3.0
- */]]></comment>
- <category>bizmodel,searchable,requestmgmt</category>
- <abstract>false</abstract>
- <key_type>autoincrement</key_type>
- <db_table>ticket_request</db_table>
- <db_key_field>id</db_key_field>
- <db_final_class_field/>
- <naming>
- <attributes>
- <attribute id="ref"/>
- </attributes>
- </naming>
- <display_template/>
- <icon>images/user-request.png</icon>
- <reconciliation>
- <attributes>
- <attribute id="ref"/>
- </attributes>
- </reconciliation>
- <order>
- <columns>
- <column id="ref" order="0">
- <ascending>false</ascending>
- </column>
- </columns>
- </order>
- </properties>
- <fields>
- <field id="request_type" xsi:type="AttributeEnum">
- <values>
- <value>service request</value>
- <value>issue</value>
- <value>information</value>
- </values>
- <sql>request_type</sql>
- <default_value>service request</default_value>
- <is_null_allowed>false</is_null_allowed>
- </field>
- <field id="freeze_reason" xsi:type="AttributeString">
- <sql>freeze_reason</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- </fields>
- <lifecycle>
- <attribute>status</attribute>
- <stimuli>
- <stimulus id="ev_assign" xsi:type="StimulusUserAction"/>
- <stimulus id="ev_reassign" xsi:type="StimulusUserAction"/>
- <stimulus id="ev_timeout" xsi:type="StimulusInternal"/>
- <stimulus id="ev_resolve" xsi:type="StimulusUserAction"/>
- <stimulus id="ev_close" xsi:type="StimulusUserAction"/>
- <stimulus id="ev_freeze" xsi:type="StimulusUserAction"/>
- </stimuli>
- <states>
- <state id="new">
- <flags>
- <attribute id="ref">
- <read_only/>
- </attribute>
- <attribute id="description">
- <must_prompt/>
- </attribute>
- <attribute id="start_date">
- <read_only/>
- </attribute>
- <attribute id="caller_id">
- <mandatory/>
- </attribute>
- <attribute id="org_id">
- <must_prompt/>
- </attribute>
- <attribute id="service_id">
- <must_prompt/>
- </attribute>
- <attribute id="servicesubcategory_id">
- <must_prompt/>
- </attribute>
- <attribute id="product">
- <must_prompt/>
- </attribute>
- <attribute id="impact">
- <must_prompt/>
- </attribute>
- <attribute id="urgency">
- <must_prompt/>
- </attribute>
- <attribute id="priority">
- <read_only/>
- </attribute>
- <attribute id="workgroup_id">
- <must_prompt/>
- </attribute>
- <attribute id="agent_email">
- <hidden/>
- </attribute>
- <attribute id="related_problem_id">
- <hidden/>
- </attribute>
- <attribute id="related_change_id">
- <hidden/>
- </attribute>
- <attribute id="close_date">
- <hidden/>
- </attribute>
- <attribute id="last_update">
- <read_only/>
- </attribute>
- <attribute id="assignment_date">
- <hidden/>
- </attribute>
- <attribute id="resolution_date">
- <hidden/>
- </attribute>
- <attribute id="tto_escalation_deadline">
- <read_only/>
- </attribute>
- <attribute id="ttr_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="closure_deadline">
- <hidden/>
- </attribute>
- <attribute id="resolution_code">
- <hidden/>
- </attribute>
- <attribute id="solution">
- <hidden/>
- </attribute>
- <attribute id="user_satisfaction">
- <hidden/>
- </attribute>
- <attribute id="user_commment">
- <hidden/>
- </attribute>
- <attribute id="request_type">
- <mandatory/>
- </attribute>
- <attribute id="freeze_reason">
- <hidden/>
- </attribute>
- </flags>
- <transitions>
- <transition id="ev_assign">
- <stimulus>ev_assign</stimulus>
- <target>assigned</target>
- <actions>
- <action>
- <verb>SetAssignedDate</verb>
- </action>
- </actions>
- </transition>
- <transition id="ev_timeout">
- <stimulus>ev_timeout</stimulus>
- <target>escalated_tto</target>
- <actions/>
- </transition>
- </transitions>
- </state>
- <state id="escalated_tto">
- <flags>
- <attribute id="ref">
- <read_only/>
- </attribute>
- <attribute id="start_date">
- <read_only/>
- </attribute>
- <attribute id="caller_id">
- <mandatory/>
- </attribute>
- <attribute id="priority">
- <read_only/>
- </attribute>
- <attribute id="agent_email">
- <hidden/>
- </attribute>
- <attribute id="related_problem_id">
- <hidden/>
- </attribute>
- <attribute id="related_change_id">
- <hidden/>
- </attribute>
- <attribute id="close_date">
- <hidden/>
- </attribute>
- <attribute id="last_update">
- <read_only/>
- </attribute>
- <attribute id="assignment_date">
- <hidden/>
- </attribute>
- <attribute id="resolution_date">
- <hidden/>
- </attribute>
- <attribute id="tto_escalation_deadline">
- <read_only/>
- </attribute>
- <attribute id="ttr_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="closure_deadline">
- <hidden/>
- </attribute>
- <attribute id="resolution_code">
- <hidden/>
- </attribute>
- <attribute id="solution">
- <hidden/>
- </attribute>
- <attribute id="user_satisfaction">
- <hidden/>
- </attribute>
- <attribute id="user_commment">
- <hidden/>
- </attribute>
- <attribute id="request_type">
- <mandatory/>
- </attribute>
- <attribute id="freeze_reason">
- <hidden/>
- </attribute>
- </flags>
- <transitions>
- <transition id="ev_assign">
- <stimulus>ev_assign</stimulus>
- <target>assigned</target>
- <actions>
- <action>
- <verb>SetAssignedDate</verb>
- </action>
- </actions>
- </transition>
- </transitions>
- </state>
- <state id="assigned">
- <flags>
- <attribute id="ref">
- <read_only/>
- </attribute>
- <attribute id="title">
- <read_only/>
- </attribute>
- <attribute id="description">
- <read_only/>
- </attribute>
- <attribute id="start_date">
- <read_only/>
- </attribute>
- <attribute id="caller_id">
- <read_only/>
- </attribute>
- <attribute id="org_id">
- <read_only/>
- </attribute>
- <attribute id="priority">
- <read_only/>
- </attribute>
- <attribute id="workgroup_id">
- <mandatory/>
- <must_prompt/>
- </attribute>
- <attribute id="agent_id">
- <mandatory/>
- <must_prompt/>
- </attribute>
- <attribute id="agent_email">
- <read_only/>
- </attribute>
- <attribute id="close_date">
- <hidden/>
- </attribute>
- <attribute id="last_update">
- <read_only/>
- </attribute>
- <attribute id="assignment_date">
- <hidden/>
- </attribute>
- <attribute id="resolution_date">
- <hidden/>
- </attribute>
- <attribute id="tto_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="ttr_escalation_deadline">
- <read_only/>
- </attribute>
- <attribute id="closure_deadline">
- <hidden/>
- </attribute>
- <attribute id="resolution_code">
- <hidden/>
- </attribute>
- <attribute id="solution">
- <hidden/>
- </attribute>
- <attribute id="user_satisfaction">
- <hidden/>
- </attribute>
- <attribute id="user_commment">
- <hidden/>
- </attribute>
- <attribute id="request_type">
- <mandatory/>
- </attribute>
- <attribute id="freeze_reason">
- <hidden/>
- </attribute>
- </flags>
- <transitions>
- <transition id="ev_reassign">
- <stimulus>ev_reassign</stimulus>
- <target>assigned</target>
- <actions/>
- </transition>
- <transition id="ev_timeout">
- <stimulus>ev_timeout</stimulus>
- <target>escalated_ttr</target>
- <actions/>
- </transition>
- <transition id="ev_resolve">
- <stimulus>ev_resolve</stimulus>
- <target>resolved</target>
- <actions>
- <action>
- <verb>SetResolveDate</verb>
- </action>
- <action>
- <verb>SetClosureDeadline</verb>
- </action>
- </actions>
- </transition>
- <transition id="ev_freeze">
- <stimulus>ev_freeze</stimulus>
- <target>frozen</target>
- <actions/>
- </transition>
- </transitions>
- </state>
- <state id="escalated_ttr">
- <flags>
- <attribute id="ref">
- <read_only/>
- </attribute>
- <attribute id="title">
- <read_only/>
- </attribute>
- <attribute id="description">
- <read_only/>
- </attribute>
- <attribute id="start_date">
- <read_only/>
- </attribute>
- <attribute id="caller_id">
- <read_only/>
- </attribute>
- <attribute id="org_id">
- <read_only/>
- </attribute>
- <attribute id="priority">
- <read_only/>
- </attribute>
- <attribute id="workgroup_id">
- <mandatory/>
- <must_prompt/>
- </attribute>
- <attribute id="agent_id">
- <mandatory/>
- <must_prompt/>
- </attribute>
- <attribute id="agent_email">
- <read_only/>
- </attribute>
- <attribute id="close_date">
- <hidden/>
- </attribute>
- <attribute id="last_update">
- <read_only/>
- </attribute>
- <attribute id="assignment_date">
- <hidden/>
- </attribute>
- <attribute id="resolution_date">
- <hidden/>
- </attribute>
- <attribute id="tto_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="ttr_escalation_deadline">
- <read_only/>
- </attribute>
- <attribute id="closure_deadline">
- <hidden/>
- </attribute>
- <attribute id="resolution_code">
- <hidden/>
- </attribute>
- <attribute id="solution">
- <hidden/>
- </attribute>
- <attribute id="user_satisfaction">
- <hidden/>
- </attribute>
- <attribute id="user_commment">
- <hidden/>
- </attribute>
- <attribute id="request_type">
- <mandatory/>
- </attribute>
- <attribute id="freeze_reason">
- <hidden/>
- </attribute>
- </flags>
- <transitions>
- <transition id="ev_reassign">
- <stimulus>ev_reassign</stimulus>
- <target>escalated_ttr</target>
- <actions/>
- </transition>
- <transition id="ev_resolve">
- <stimulus>ev_resolve</stimulus>
- <target>resolved</target>
- <actions>
- <action>
- <verb>SetResolveDate</verb>
- </action>
- <action>
- <verb>SetClosureDeadline</verb>
- </action>
- </actions>
- </transition>
- </transitions>
- </state>
- <state id="frozen">
- <flags>
- <attribute id="ref">
- <read_only/>
- </attribute>
- <attribute id="title">
- <read_only/>
- </attribute>
- <attribute id="description">
- <read_only/>
- </attribute>
- <attribute id="start_date">
- <read_only/>
- </attribute>
- <attribute id="caller_id">
- <read_only/>
- </attribute>
- <attribute id="org_id">
- <read_only/>
- </attribute>
- <attribute id="priority">
- <read_only/>
- </attribute>
- <attribute id="workgroup_id">
- <mandatory/>
- </attribute>
- <attribute id="agent_id">
- <mandatory/>
- </attribute>
- <attribute id="agent_email">
- <read_only/>
- </attribute>
- <attribute id="close_date">
- <hidden/>
- </attribute>
- <attribute id="last_update">
- <read_only/>
- </attribute>
- <attribute id="assignment_date">
- <hidden/>
- </attribute>
- <attribute id="resolution_date">
- <hidden/>
- </attribute>
- <attribute id="tto_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="ttr_escalation_deadline">
- <read_only/>
- </attribute>
- <attribute id="closure_deadline">
- <hidden/>
- </attribute>
- <attribute id="resolution_code">
- <hidden/>
- </attribute>
- <attribute id="solution">
- <hidden/>
- </attribute>
- <attribute id="user_satisfaction">
- <hidden/>
- </attribute>
- <attribute id="user_commment">
- <hidden/>
- </attribute>
- <attribute id="request_type">
- <mandatory/>
- </attribute>
- <attribute id="freeze_reason">
- <mandatory/>
- <must_prompt/>
- </attribute>
- </flags>
- <transitions>
- <transition id="ev_timeout">
- <stimulus>ev_timeout</stimulus>
- <target>escalated_ttr</target>
- <actions/>
- </transition>
- <transition id="ev_assign">
- <stimulus>ev_assign</stimulus>
- <target>assigned</target>
- <actions/>
- </transition>
- <transition id="ev_resolve">
- <stimulus>ev_resolve</stimulus>
- <target>resolved</target>
- <actions/>
- </transition>
- </transitions>
- </state>
- <state id="resolved">
- <flags>
- <attribute id="ref">
- <read_only/>
- </attribute>
- <attribute id="title">
- <read_only/>
- </attribute>
- <attribute id="description">
- <read_only/>
- </attribute>
- <attribute id="start_date">
- <read_only/>
- </attribute>
- <attribute id="caller_id">
- <read_only/>
- </attribute>
- <attribute id="org_id">
- <read_only/>
- </attribute>
- <attribute id="service_id">
- <read_only/>
- </attribute>
- <attribute id="servicesubcategory_id">
- <read_only/>
- </attribute>
- <attribute id="product">
- <read_only/>
- </attribute>
- <attribute id="impact">
- <read_only/>
- </attribute>
- <attribute id="urgency">
- <read_only/>
- </attribute>
- <attribute id="priority">
- <read_only/>
- </attribute>
- <attribute id="workgroup_id">
- <read_only/>
- </attribute>
- <attribute id="agent_id">
- <read_only/>
- </attribute>
- <attribute id="agent_email">
- <read_only/>
- </attribute>
- <attribute id="close_date">
- <hidden/>
- </attribute>
- <attribute id="last_update">
- <read_only/>
- </attribute>
- <attribute id="assignment_date">
- <hidden/>
- </attribute>
- <attribute id="resolution_date">
- <hidden/>
- </attribute>
- <attribute id="tto_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="ttr_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="closure_deadline">
- <read_only/>
- </attribute>
- <attribute id="resolution_code">
- <must_prompt/>
- </attribute>
- <attribute id="solution">
- <must_prompt/>
- </attribute>
- <attribute id="user_satisfaction">
- <hidden/>
- </attribute>
- <attribute id="user_commment">
- <hidden/>
- </attribute>
- <attribute id="request_type">
- <mandatory/>
- </attribute>
- <attribute id="freeze_reason">
- <hidden/>
- </attribute>
- </flags>
- <transitions>
- <transition id="ev_reassign">
- <stimulus>ev_reassign</stimulus>
- <target>assigned</target>
- <actions/>
- </transition>
- <transition id="ev_close">
- <stimulus>ev_close</stimulus>
- <target>closed</target>
- <actions>
- <action>
- <verb>SetClosureDate</verb>
- </action>
- </actions>
- </transition>
- </transitions>
- </state>
- <state id="closed">
- <flags>
- <attribute id="ref">
- <read_only/>
- </attribute>
- <attribute id="title">
- <read_only/>
- </attribute>
- <attribute id="description">
- <read_only/>
- </attribute>
- <attribute id="ticket_log">
- <read_only/>
- </attribute>
- <attribute id="start_date">
- <read_only/>
- </attribute>
- <attribute id="caller_id">
- <read_only/>
- </attribute>
- <attribute id="org_id">
- <read_only/>
- </attribute>
- <attribute id="service_id">
- <read_only/>
- </attribute>
- <attribute id="servicesubcategory_id">
- <read_only/>
- </attribute>
- <attribute id="product">
- <read_only/>
- </attribute>
- <attribute id="impact">
- <read_only/>
- </attribute>
- <attribute id="urgency">
- <read_only/>
- </attribute>
- <attribute id="priority">
- <read_only/>
- </attribute>
- <attribute id="workgroup_id">
- <read_only/>
- </attribute>
- <attribute id="agent_id">
- <read_only/>
- </attribute>
- <attribute id="agent_email">
- <read_only/>
- </attribute>
- <attribute id="close_date">
- <read_only/>
- </attribute>
- <attribute id="last_update">
- <read_only/>
- </attribute>
- <attribute id="assignment_date">
- <hidden/>
- </attribute>
- <attribute id="resolution_date">
- <hidden/>
- </attribute>
- <attribute id="tto_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="ttr_escalation_deadline">
- <hidden/>
- </attribute>
- <attribute id="closure_deadline">
- <hidden/>
- </attribute>
- <attribute id="resolution_code">
- <read_only/>
- </attribute>
- <attribute id="solution">
- <read_only/>
- </attribute>
- <attribute id="user_satisfaction">
- <must_prompt/>
- </attribute>
- <attribute id="user_commment">
- <must_prompt/>
- </attribute>
- <attribute id="request_type">
- <read_only/>
- </attribute>
- <attribute id="freeze_reason">
- <hidden/>
- </attribute>
- </flags>
- <transitions/>
- </state>
- </states>
- </lifecycle>
- <methods>
- <method id="ComputeValues">
- <static>false</static>
- <access>public</access>
- <type>Overload-DBObject</type>
- <code><![CDATA[ public function ComputeValues()
- {
- $sCurrRef = $this->Get('ref');
- if (strlen($sCurrRef) == 0)
- {
- $iKey = $this->GetKey();
- if ($iKey < 0)
- {
- // Object not yet in the Database
- $iKey = MetaModel::GetNextKey(get_class($this));
- }
- $sName = sprintf('R-%06d', $iKey);
- $this->Set('ref', $sName);
- }
- return parent::ComputeValues();
- }]]></code>
- </method>
- <method id="GetIcon">
- <comment>/**
- * Get the icon representing this object
- * @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)
- * @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file
- */</comment>
- <static>false</static>
- <access>public</access>
- <type>Overload-DBObject</type>
- <code><![CDATA[ public function GetIcon($bImgTag = true)
- {
- $sStatus = $this->Get('status');
- switch($this->GetState())
- {
- case 'escalated_tto':
- case 'escalated_ttr':
- $sIcon = self::MakeIconFromName('user-request-escalated.png');
- break;
-
- case 'resolved':
- case 'closed':
- $sIcon = self::MakeIconFromName('user-request-closed.png');
- break;
- case 'new':
- $sIcon = self::MakeIconFromName('user-request.png');
- $oEscalationDeadline = $this->Get('tto_escalation_deadline');
- if ($oEscalationDeadline != null)
- {
- // A SLA is running
- $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
- $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
- $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
- if ($ratio <= 0)
- {
- $sIcon = self::MakeIconFromName('user-request-escalated.png');
- }
- else if ($ratio <= 0.25)
- {
- $sIcon = self::MakeIconFromName('user-request-deadline.png');
- }
- }
- break;
-
- case 'assigned':
- $sIcon = self::MakeIconFromName('user-request.png');
- $oEscalationDeadline = $this->Get('ttr_escalation_deadline');
- if ($oEscalationDeadline != null)
- {
- // A SLA is running
- $iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
- $iEscalationDeadline = AttributeDateTime::GetAsUnixSeconds($oEscalationDeadline);
- $ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
- if ($ratio <= 0)
- {
- $sIcon = self::MakeIconFromName('user-request-escalated.png');
- }
- else if ($ratio <= 0.25)
- {
- $sIcon = self::MakeIconFromName('user-request-deadline.png');
- }
- }
- break;
-
- default:
- $sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
- }
- return $sIcon;
- }]]></code>
- </method>
- <method id="MakeIconFromName">
- <static>true</static>
- <access>protected</access>
- <type>Overload-DBObject</type>
- <code><![CDATA[ protected static function MakeIconFromName($sIconName, $bImgTag = true)
- {
- $sIcon = '';
- if ($sIconName != '')
- {
- $sPath = utils::GetAbsoluteUrlModulesRoot().'itop-request-mgmt-1.0.0/images/'.$sIconName;
- if ($bImgTag)
- {
- $sIcon = "<img src=\"$sPath\" style=\"vertical-align:middle;\"/>";
- }
- else
- {
- $sIcon = $sPath;
- }
- }
- return $sIcon;
- }]]></code>
- </method>
- </methods>
- <presentation>
- <details>
- <items>
- <item id="document_list">
- <rank>10</rank>
- </item>
- <item id="ci_list">
- <rank>20</rank>
- </item>
- <item id="contact_list">
- <rank>30</rank>
- </item>
- <item id="incident_list">
- <rank>40</rank>
- </item>
- <item id="col:col1">
- <rank>50</rank>
- <items>
- <item id="fieldset:Ticket:baseinfo">
- <rank>10</rank>
- <items>
- <item id="ref">
- <rank>10</rank>
- </item>
- <item id="title">
- <rank>20</rank>
- </item>
- <item id="org_id">
- <rank>30</rank>
- </item>
- <item id="status">
- <rank>40</rank>
- </item>
- <item id="priority">
- <rank>50</rank>
- </item>
- <item id="request_type">
- <rank>60</rank>
- </item>
- <item id="service_id">
- <rank>70</rank>
- </item>
- <item id="servicesubcategory_id">
- <rank>80</rank>
- </item>
- <item id="product">
- <rank>90</rank>
- </item>
- </items>
- </item>
- <item id="fieldset:Ticket:moreinfo">
- <rank>20</rank>
- <items>
- <item id="impact">
- <rank>10</rank>
- </item>
- <item id="urgency">
- <rank>20</rank>
- </item>
- <item id="description">
- <rank>30</rank>
- </item>
- <item id="resolution_code">
- <rank>40</rank>
- </item>
- <item id="solution">
- <rank>50</rank>
- </item>
- <item id="user_satisfaction">
- <rank>60</rank>
- </item>
- <item id="user_commment">
- <rank>70</rank>
- </item>
- <item id="freeze_reason">
- <rank>80</rank>
- </item>
- </items>
- </item>
- </items>
- </item>
- <item id="col:col2">
- <rank>60</rank>
- <items>
- <item id="fieldset:Ticket:date">
- <rank>10</rank>
- <items>
- <item id="start_date">
- <rank>10</rank>
- </item>
- <item id="last_update">
- <rank>20</rank>
- </item>
- <item id="assignment_date">
- <rank>30</rank>
- </item>
- <item id="tto_escalation_deadline">
- <rank>40</rank>
- </item>
- <item id="ttr_escalation_deadline">
- <rank>50</rank>
- </item>
- <item id="close_date">
- <rank>60</rank>
- </item>
- <item id="closure_deadline">
- <rank>70</rank>
- </item>
- </items>
- </item>
- <item id="fieldset:Ticket:contact">
- <rank>20</rank>
- <items>
- <item id="caller_id">
- <rank>10</rank>
- </item>
- <item id="workgroup_id">
- <rank>20</rank>
- </item>
- <item id="agent_id">
- <rank>30</rank>
- </item>
- </items>
- </item>
- <item id="fieldset:Ticket:relation">
- <rank>30</rank>
- <items>
- <item id="related_problem_id">
- <rank>10</rank>
- </item>
- <item id="related_change_id">
- <rank>20</rank>
- </item>
- </items>
- </item>
- </items>
- </item>
- </items>
- </details>
- <search>
- <items>
- <item id="ref">
- <rank>10</rank>
- </item>
- <item id="title">
- <rank>20</rank>
- </item>
- <item id="org_id">
- <rank>30</rank>
- </item>
- <item id="request_type">
- <rank>40</rank>
- </item>
- <item id="start_date">
- <rank>50</rank>
- </item>
- <item id="status">
- <rank>60</rank>
- </item>
- <item id="caller_id">
- <rank>70</rank>
- </item>
- <item id="service_id">
- <rank>80</rank>
- </item>
- <item id="servicesubcategory_id">
- <rank>90</rank>
- </item>
- <item id="product">
- <rank>100</rank>
- </item>
- <item id="impact">
- <rank>110</rank>
- </item>
- <item id="urgency">
- <rank>120</rank>
- </item>
- <item id="priority">
- <rank>130</rank>
- </item>
- <item id="workgroup_id">
- <rank>140</rank>
- </item>
- <item id="agent_id">
- <rank>150</rank>
- </item>
- <item id="agent_email">
- <rank>160</rank>
- </item>
- <item id="close_date">
- <rank>170</rank>
- </item>
- <item id="resolution_code">
- <rank>180</rank>
- </item>
- <item id="solution">
- <rank>190</rank>
- </item>
- <item id="user_satisfaction">
- <rank>200</rank>
- </item>
- <item id="user_commment">
- <rank>210</rank>
- </item>
- </items>
- </search>
- <list>
- <items>
- <item id="title">
- <rank>10</rank>
- </item>
- <item id="org_id">
- <rank>20</rank>
- </item>
- <item id="start_date">
- <rank>30</rank>
- </item>
- <item id="status">
- <rank>40</rank>
- </item>
- <item id="service_id">
- <rank>50</rank>
- </item>
- <item id="priority">
- <rank>60</rank>
- </item>
- <item id="workgroup_id">
- <rank>70</rank>
- </item>
- <item id="agent_id">
- <rank>80</rank>
- </item>
- </items>
- </list>
- </presentation>
- </class>
- </classes>
- <menus>
- <menu id="RequestManagement" xsi:type="MenuGroup" _delta="define">
- <rank>30</rank>
- </menu>
- <menu id="UserRequest:Overview" xsi:type="DashboardMenuNode" _delta="define">
- <rank>0</rank>
- <parent>RequestManagement</parent>
- <definition>
- <title>UI:RequestMgmtMenuOverview:Title</title>
- <layout>DashboardLayoutTwoCols</layout>
- <cells>
- <cell id="0">
- <rank>0</rank>
- <dashlets>
- <dashlet id="1" xsi:type="DashletGroupByBars">
- <rank>0</rank>
- <title>UI-RequestManagementOverview-RequestByService</title>
- <query>SELECT UserRequest</query>
- <group_by>service_id</group_by>
- <style>bars</style>
- </dashlet>
- </dashlets>
- </cell>
- <cell id="1">
- <rank>1</rank>
- <dashlets>
- <dashlet id="2" xsi:type="DashletGroupByPie">
- <rank>0</rank>
- <title>UI-RequestManagementOverview-RequestByPriority</title>
- <query>SELECT UserRequest</query>
- <group_by>priority</group_by>
- <style>pie</style>
- </dashlet>
- </dashlets>
- </cell>
- <cell id="2">
- <rank>2</rank>
- <dashlets>
- <dashlet id="3" xsi:type="DashletObjectList">
- <rank>0</rank>
- <title>UI-RequestManagementOverview-RequestUnassigned</title>
- <query>SELECT UserRequest WHERE status IN ("new", "escalated_tto")</query>
- </dashlet>
- </dashlets>
- </cell>
- </cells>
- </definition>
- </menu>
- <menu id="NewUserRequest" xsi:type="NewObjectMenuNode" _delta="define">
- <rank>1</rank>
- <parent>RequestManagement</parent>
- <class>UserRequest</class>
- </menu>
- <menu id="SearchUserRequests" xsi:type="SearchMenuNode" _delta="define">
- <rank>2</rank>
- <parent>RequestManagement</parent>
- <class>UserRequest</class>
- </menu>
- <menu id="UserRequest:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
- <rank>3</rank>
- <parent>RequestManagement</parent>
- <template_file/>
- </menu>
- <menu id="UserRequest:MyRequests" xsi:type="OQLMenuNode" _delta="define">
- <rank>1</rank>
- <parent>UserRequest:Shortcuts</parent>
- <oql><![CDATA[SELECT UserRequest WHERE agent_id = :current_contact_id AND status NOT IN ("closed","resolved")]]></oql>
- <do_search/>
- <auto_reload>fast</auto_reload>
- </menu>
- <menu id="UserRequest:EscalatedRequests" xsi:type="OQLMenuNode" _delta="define">
- <rank>2</rank>
- <parent>UserRequest:Shortcuts</parent>
- <oql><![CDATA[SELECT UserRequest WHERE status IN ("escalated_tto", "escalated_ttr")]]></oql>
- <do_search/>
- <auto_reload>fast</auto_reload>
- </menu>
- <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="define">
- <rank>3</rank>
- <parent>UserRequest:Shortcuts</parent>
- <oql><![CDATA[SELECT UserRequest WHERE status IN ("new", "assigned", "escalated_tto", "escalated_ttr", "frozen", "resolved")]]></oql>
- <do_search/>
- <auto_reload>fast</auto_reload>
- </menu>
- </menus>
- </itop_design>
|