ResponseTicket
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;
}]]>
-
10
-
20
-
30
-
40
-
50
-
10
-
10
-
20
-
30
-
40
-
50
-
60
-
70
-
80
-
90
-
20
-
10
-
20
-
30
-
40
-
50
-
60
-
70
-
80
-
60
-
10
-
10
-
20
-
30
-
40
-
50
-
60
-
70
-
20
-
10
-
20
-
30
-
30
-
10
-
20
-
10
-
20
-
30
-
40
-
50
-
60
-
70
-
80
-
90
-
100
-
110
-
120
-
130
-
140
-
150
-
160
-
170
-
180
-
190
-
200
-
210
-
10
-
20
-
30
-
40
-
50
-
60
-
70
-
80