mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 21:48:45 +02:00
1007 lines
32 KiB
XML
1007 lines
32 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
<classes>
|
|
<class id="UserRequest" _delta="define">
|
|
<parent>ResponseTicket</parent>
|
|
<properties>
|
|
<comment><![CDATA[/**
|
|
* Persistent classes for a CMDB
|
|
*
|
|
* @author Erwan Taloc <erwan.taloc@combodo.com>
|
|
* @author Romain Quetiez <romain.quetiez@combodo.com>
|
|
* @author Denis Flaven <denis.flaven@combodo.com>
|
|
* @license http://www.opensource.org/licenses/gpl-3.0.html LGPL
|
|
*/]]></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></db_final_class_field>
|
|
<naming>
|
|
<format>%1$s</format>
|
|
<attributes>
|
|
<attribute id="ref"/>
|
|
</attributes>
|
|
</naming>
|
|
<display_template></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></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_change/>
|
|
</attribute>
|
|
<attribute id="start_date">
|
|
<read_only/>
|
|
</attribute>
|
|
<attribute id="caller_id">
|
|
<mandatory/>
|
|
</attribute>
|
|
<attribute id="org_id">
|
|
<must_change/>
|
|
</attribute>
|
|
<attribute id="service_id">
|
|
<must_change/>
|
|
</attribute>
|
|
<attribute id="servicesubcategory_id">
|
|
<must_change/>
|
|
</attribute>
|
|
<attribute id="product">
|
|
<must_prompt/>
|
|
</attribute>
|
|
<attribute id="impact">
|
|
<must_change/>
|
|
</attribute>
|
|
<attribute id="urgency">
|
|
<must_change/>
|
|
</attribute>
|
|
<attribute id="priority">
|
|
<read_only/>
|
|
</attribute>
|
|
<attribute id="workgroup_id">
|
|
<must_change/>
|
|
</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>
|
|
<stimulus>ev_assign</stimulus>
|
|
<target>assigned</target>
|
|
<actions>
|
|
<action>
|
|
<verb>SetAssignedDate</verb>
|
|
</action>
|
|
</actions>
|
|
</transition>
|
|
<transition>
|
|
<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>
|
|
<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>
|
|
<stimulus>ev_reassign</stimulus>
|
|
<target>assigned</target>
|
|
<actions/>
|
|
</transition>
|
|
<transition>
|
|
<stimulus>ev_timeout</stimulus>
|
|
<target>escalated_ttr</target>
|
|
<actions/>
|
|
</transition>
|
|
<transition>
|
|
<stimulus>ev_resolve</stimulus>
|
|
<target>resolved</target>
|
|
<actions>
|
|
<action>
|
|
<verb>SetResolveDate</verb>
|
|
</action>
|
|
<action>
|
|
<verb>SetClosureDeadline</verb>
|
|
</action>
|
|
</actions>
|
|
</transition>
|
|
<transition>
|
|
<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>
|
|
<stimulus>ev_reassign</stimulus>
|
|
<target>escalated_ttr</target>
|
|
<actions/>
|
|
</transition>
|
|
<transition>
|
|
<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>
|
|
<stimulus>ev_timeout</stimulus>
|
|
<target>escalated_ttr</target>
|
|
<actions/>
|
|
</transition>
|
|
<transition>
|
|
<stimulus>ev_assign</stimulus>
|
|
<target>assigned</target>
|
|
<actions/>
|
|
</transition>
|
|
<transition>
|
|
<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>
|
|
<stimulus>ev_reassign</stimulus>
|
|
<target>assigned</target>
|
|
<actions/>
|
|
</transition>
|
|
<transition>
|
|
<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>document_list</item>
|
|
<item>ci_list</item>
|
|
<item>contact_list</item>
|
|
<item>incident_list</item>
|
|
<item id="col:col1">
|
|
<items>
|
|
<item id="fieldset:Ticket:baseinfo">
|
|
<items>
|
|
<item>ref</item>
|
|
<item>title</item>
|
|
<item>org_id</item>
|
|
<item>status</item>
|
|
<item>priority</item>
|
|
<item>request_type</item>
|
|
<item>service_id</item>
|
|
<item>servicesubcategory_id</item>
|
|
<item>product</item>
|
|
</items>
|
|
</item>
|
|
<item id="fieldset:Ticket:moreinfo">
|
|
<items>
|
|
<item>impact</item>
|
|
<item>urgency</item>
|
|
<item>description</item>
|
|
<item>resolution_code</item>
|
|
<item>solution</item>
|
|
<item>user_satisfaction</item>
|
|
<item>user_commment</item>
|
|
<item>freeze_reason</item>
|
|
</items>
|
|
</item>
|
|
</items>
|
|
</item>
|
|
<item id="col:col2">
|
|
<items>
|
|
<item id="fieldset:Ticket:date">
|
|
<items>
|
|
<item>start_date</item>
|
|
<item>last_update</item>
|
|
<item>assignment_date</item>
|
|
<item>tto_escalation_deadline</item>
|
|
<item>ttr_escalation_deadline</item>
|
|
<item>close_date</item>
|
|
<item>closure_deadline</item>
|
|
</items>
|
|
</item>
|
|
<item id="fieldset:Ticket:contact">
|
|
<items>
|
|
<item>caller_id</item>
|
|
<item>workgroup_id</item>
|
|
<item>agent_id</item>
|
|
</items>
|
|
</item>
|
|
<item id="fieldset:Ticket:relation">
|
|
<items>
|
|
<item>related_problem_id</item>
|
|
<item>related_change_id</item>
|
|
</items>
|
|
</item>
|
|
</items>
|
|
</item>
|
|
</items>
|
|
</details>
|
|
<search>
|
|
<items>
|
|
<item>ref</item>
|
|
<item>title</item>
|
|
<item>org_id</item>
|
|
<item>request_type</item>
|
|
<item>start_date</item>
|
|
<item>status</item>
|
|
<item>caller_id</item>
|
|
<item>service_id</item>
|
|
<item>servicesubcategory_id</item>
|
|
<item>product</item>
|
|
<item>impact</item>
|
|
<item>urgency</item>
|
|
<item>priority</item>
|
|
<item>workgroup_id</item>
|
|
<item>agent_id</item>
|
|
<item>agent_email</item>
|
|
<item>close_date</item>
|
|
<item>resolution_code</item>
|
|
<item>solution</item>
|
|
<item>user_satisfaction</item>
|
|
<item>user_commment</item>
|
|
</items>
|
|
</search>
|
|
<list>
|
|
<items>
|
|
<item>title</item>
|
|
<item>org_id</item>
|
|
<item>start_date</item>
|
|
<item>status</item>
|
|
<item>service_id</item>
|
|
<item>priority</item>
|
|
<item>workgroup_id</item>
|
|
<item>agent_id</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_file>request-dashboard.xml</definition_file>
|
|
</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></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></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></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></do_search>
|
|
<auto_reload>fast</auto_reload>
|
|
</menu>
|
|
</menus>
|
|
</itop_design>
|