ResponseTicket
* @author Romain Quetiez
* @author Denis Flaven
* @license http://www.opensource.org/licenses/gpl-3.0.html LGPL
*/]]>
bizmodel,searchable,requestmgmt
false
autoincrement
ticket_request
id
%1$s
images/user-request.png
false
service request
issue
information
request_type
service request
false
freeze_reason
true
status
ev_assign
assigned
SetAssignedDate
ev_timeout
escalated_tto
ev_assign
assigned
SetAssignedDate
ev_reassign
assigned
ev_timeout
escalated_ttr
ev_resolve
resolved
SetResolveDate
SetClosureDeadline
ev_freeze
frozen
ev_reassign
escalated_ttr
ev_resolve
resolved
SetResolveDate
SetClosureDeadline
ev_timeout
escalated_ttr
ev_assign
assigned
ev_resolve
resolved
ev_reassign
assigned
ev_close
closed
SetClosureDate
false
public
Overload-DBObject
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();
}]]>
/**
* 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
*/
false
public
Overload-DBObject
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;
}]]>
true
protected
Overload-DBObject
";
}
else
{
$sIcon = $sPath;
}
}
return $sIcon;
}]]>
- document_list
- ci_list
- contact_list
- incident_list
-
-
- ref
- title
- org_id
- status
- priority
- request_type
- service_id
- servicesubcategory_id
- product
-
- impact
- urgency
- description
- resolution_code
- solution
- user_satisfaction
- user_commment
- freeze_reason
-
-
- start_date
- last_update
- assignment_date
- tto_escalation_deadline
- ttr_escalation_deadline
- close_date
- closure_deadline
-
- caller_id
- workgroup_id
- agent_id
-
- related_problem_id
- related_change_id
- ref
- title
- org_id
- request_type
- start_date
- status
- caller_id
- service_id
- servicesubcategory_id
- product
- impact
- urgency
- priority
- workgroup_id
- agent_id
- agent_email
- close_date
- resolution_code
- solution
- user_satisfaction
- user_commment
- title
- org_id
- start_date
- status
- service_id
- priority
- workgroup_id
- agent_id