Ticket
bizmodel,searchable,problemmgmt
false
autoincrement
ticket_problem
id
status
new
assigned
resolved
closed
$ibo-lifecycle-neutral-state-primary-color
$ibo-lifecycle-neutral-state-secondary-color
status
new
false
list
SELECT Service
service_id
Service
true
DEL_MANUAL
false
service_id
name
service_id]]>
servicesubcategory_id
ServiceSubcategory
true
DEL_MANUAL
false
servicesubcategory_id
name
product
true
1
2
3
impact
1
false
list
1
2
3
4
urgency
1
false
list
1
2
3
4
priority
4
false
list
related_change_id
Change
true
DEL_MANUAL
related_change_id
ref
assignment_date
true
resolution_date
true
KnownError
problem_id
add_only
0
0
link
false
UserRequest
parent_problem_id
add_remove
0
0
link
false
Incident
parent_problem_id
add_remove
0
0
link
false
assigned
SetCurrentDate
assignment_date
new
assigned
resolved
SetCurrentDate
resolution_date
assigned
assigned
closed
SetCurrentDate
close_date
resolved
true
public
Overload-DBObject
false
public
LifecycleAction
Set('assignment_date', time());
return true;
}]]>
false
public
LifecycleAction
Set('resolution_date', time());
return true;
}]]>
false
public
LifecycleAction
Set('close_date', time());
return true;
}]]>
/** Compute the priority of the ticket based on its impact and urgency
* @return integer The priority of the ticket 1(high) .. 3(low)
*/
false
public
LifecycleAction
array(
1 => 1,
2 => 1,
3 => 2,
4 => 4,
),
// a group
2 => array(
1 => 1,
2 => 2,
3 => 3,
4 => 4,
),
// a departement!
3 => array(
1 => 2,
2 => 3,
3 => 3,
4 => 4,
),
);
$oAttDef = MetaModel::GetAttributeDef(get_class($this), 'priority');
$iPriority = $oAttDef->IsNullAllowed() ? null : $oAttDef->GetDefaultValue();
if (isset($aPriorities[(int)$this->Get('impact')]) && isset($aPriorities[(int)$this->Get('impact')][(int)$this->Get('urgency')])) {
$iPriority = $aPriorities[(int)$this->Get('impact')][(int)$this->Get('urgency')];
}
return $iPriority;
}]]>
false
public
Overload-DBObject
Set('priority', $this->ComputePriority());
}]]>
false
protected
Overload-DBObject
SetIfNull('start_date', time());
$this->SetIfNull('last_update', time());
}]]>
false
protected
Overload-DBObject
Set('last_update', time());
}]]>
-
10
-
20
-
30
-
40
-
50
-
60
-
70
-
10
-
10
-
20
-
30
-
40
-
50
-
60
-
70
-
20
-
10
-
20
-
80
-
10
-
10
-
20
-
30
-
20
-
10
-
20
-
30
-
40
-
50
-
90
-
10
-
10
-
20
-
20
-
10
-
10
-
20
-
30
-
40
-
50
-
55
-
60
-
70
-
80
-
90
-
100
-
110
-
120
-
130
-
140
-
150
-
10
-
20
-
30
-
40
-
50
-
60
1
ProblemManagement
Problem
2
ProblemManagement
Problem
1
Problem:Shortcuts
2
Problem:Shortcuts
1