Ticket bizmodel,searchable,requestmgmt false autoincrement ticket_incident id status true rank new 10 assigned 60 pending 70 escalated_tto 80 escalated_ttr 90 resolved 100 closed 110 $ibo-lifecycle-neutral-state-primary-color $ibo-lifecycle-neutral-state-secondary-color status new false list 1 2 3 impact 1 false list 1 2 3 4 priority 4 false 1 2 3 4 urgency 4 false label in_person chat mail phone portal monitoring origin phone true list org_id AND s.status != 'obsolete' ]]> service_id Service true DEL_MANUAL false service_id name service_id AND request_type = 'incident' AND status != 'obsolete']]> servicesubcategory_id ServiceSubcategory true DEL_MANUAL false servicesubcategory_id name yes no escalation_flag no true list escalation_reason true assignment_date true resolution_date true last_pending_date true true ResponseTicketTTO warning false critical false ApplyStimulus ev_timeout true ResponseTicketTTR warning false critical false ApplyStimulus ev_timeout tto 100_deadline tto 100_passed tto 100_overrun tto timespent ttr 100_deadline ttr 100_passed ttr 100_overrun ttr timespent time_spent true label assistance other software patch training hardware repair system update bug fixed resolution_code assistance true list solution true html pending_reason true id AND status NOT IN ('resolved','closed')]]> parent_incident_id Incident true DEL_MANUAL parent_incident_id ref parent_problem_id Problem true DEL_MANUAL parent_problem_id ref parent_change_id Change true DEL_MANUAL parent_change_id ref UserRequest parent_incident_id add_remove 0 0 Incident parent_incident_id add_remove 0 0 public_log true 1 2 3 4 user_satisfaction 1 true list user_commment true 1 HIGHLIGHT_CLASS_WARNING images/incident-deadline.svg 2 HIGHLIGHT_CLASS_CRITICAL images/incident-escalated.svg 3 HIGHLIGHT_CLASS_NONE images/incident-closed.svg assigned SetCurrentDate assignment_date escalated_tto resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets critical new assigned SetCurrentDate assignment_date resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets new pending SetCurrentDate last_pending_date resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets assigned escalated_ttr resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets critical assigned pending SetCurrentDate last_pending_date resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets assigned resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets assigned assigned resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets closed assigned closed SetCurrentDate close_date assigned closed resolved true public Overload-DBObject false public Overload-DBObject IsNew() && ($this->Get('parent_incident_id') == $this->GetKey())) { $this->m_aCheckIssues[] = Dict::Format('Class:Incident/Error:CannotAssignParentIncidentIdToSelf'); } }]]> /** 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()); return parent::ComputeValues(); }]]> false public Overload-cmdbAbstractObject GetKey();; $oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT KnownError AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID")); $iNumberKE=$oKnownErrorSet->count(); if ($iNumberKE > 0) { $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode)." ($iNumberKE)", Dict::S($sTabCode."+")); } else { $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode), Dict::S($sTabCode."+")); } self::DisplaySet($oPage, $oKnownErrorSet, [ 'menu' => false, 'panel_title' => Dict::S($sTabCode), 'panel_icon' => MetaModel::GetClassIcon($sKnownErrorClass, false), 'panel_title_tooltip' => Dict::S($sTabCode."+"), ]); } }]]> false public LifecycleAction $this->GetKey())); while($oRequest = $oChildRequestSet->Fetch()) { if (!array_key_exists($oRequest->GetKey(), $aRequests)) { $aRequests[$oRequest->GetKey()] = true; $oRequest->ResolveFrom($this); } } } // Automatically resolve child incidents $sOQL = "SELECT Incident WHERE parent_incident_id = :ticket AND status != 'resolved'"; $oChildIncidentSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), array('ticket' => $this->GetKey())); while($oIncident = $oChildIncidentSet->Fetch()) { if (!array_key_exists($oIncident->GetKey(), $Incidents)) { $Incidents[$oIncident->GetKey()] = true; $oIncident->ResolveFrom($this); } } return true; }]]> false public Internal Get('status') != 'resolved' && $this->Get('status') != 'closed' ) { $aDummy = array(); $aExcludedAttributes = array('team_id', 'agent_id'); foreach(MetaModel::ListAttributeDefs(get_class($this)) as $sAttCode => $oAttDef) { // Exclude inter dependant attributes to keep consistency if(in_array($sAttCode, $aExcludedAttributes)) { continue; } if (($this->GetAttributeFlags($sAttCode, $aDummy, 'resolved') & OPT_ATT_MANDATORY) && empty($this->Get($sAttCode))) { $this->Set($sAttCode, $oParentTicket->Get($sAttCode)); } } if (($this->Get('team_id') == 0) || ($this->Get('agent_id') ==0)) { $this->Set('team_id', $oParentTicket->Get('team_id')); $this->Set('agent_id', $oParentTicket->Get('agent_id')); } $sParent = '[['.get_class($oParentTicket).':'.$oParentTicket->GetKey().'|'.$oParentTicket->Get('ref').']]'; $this->Set('solution', Dict::Format('Tickets:ResolvedFrom', $sParent, MetaModel::GetName(get_class($oParentTicket)))); $this->ApplyStimulus('ev_autoresolve'); $this->DBUpdate(); } }]]> false public LifecycleAction Get('public_log'); $sLogPublic = $oLog->GetModifiedEntry('html'); if ($sLogPublic != '') { $sOQL = "SELECT UserRequest WHERE parent_incident_id=:ticket"; $oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), array( 'ticket' => $this->GetKey(), ) ); while($oRequest = $oChildRequestSet->Fetch()) { $oRequest->set('public_log',$sLogPublic); $oRequest->DBUpdate(); } } $oLog = $this->Get('private_log'); $sLogPrivate = $oLog->GetModifiedEntry('html'); if ($sLogPrivate != '') { $sOQL = "SELECT UserRequest WHERE parent_incident_id=:ticket"; $oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), array( 'ticket' => $this->GetKey(), ) ); while($oRequest = $oChildRequestSet->Fetch()) { $oRequest->set('private_log',$sLogPrivate); $oRequest->DBUpdate(); } } return true; }]]> false public LifecycleAction Get('public_log'); $sLogPublic = $oLog->GetModifiedEntry('html'); if ($sLogPublic != '') { $sOQL = "SELECT Incident WHERE parent_incident_id=:ticket"; $oChildIncidentSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), array( 'ticket' => $this->GetKey(), ) ); while($oIncident = $oChildIncidentSet->Fetch()) { $oIncident->set('public_log',$sLogPublic); $oIncident->DBUpdate(); } } $oLog = $this->Get('private_log'); $sLogPrivate = $oLog->GetModifiedEntry('html'); if ($sLogPrivate != '') { $sOQL = "SELECT Incident WHERE parent_incident_id=:ticket"; $oChildIncidentSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), array( 'ticket' => $this->GetKey(), ) ); while($oIncident = $oChildIncidentSet->Fetch()) { $oIncident->set('private_log',$sLogPrivate); $oIncident->DBUpdate(); } } return true; }]]> false public LifecycleAction UpdateImpactedItems(); }]]> false protected Overload-DBObject SetIfNull('last_update', time()); $this->SetIfNull('start_date', time()); }]]> false protected Overload-DBObject Set('last_update', time()); $this->UpdateChildRequestLog(); $this->UpdateChildIncidentLog(); }]]>
10 20 30 40 50 60 10 10 20 30 40 50 60 20 10 20 30 40 50 70 10 10 20 30 20 10 20 30 10 20 30 40 50 60 70 80 80 10 10 20 30 20 10 20 30 40 50 30 10 20 30 40 100 110
10 20 30 40 50 70 80 90 95 100 110 120 130 140 150 160 170 180 190 200 210 220 230 10 20 30 40 50 60
35 0 IncidentManagement DashboardLayoutTwoCols UI:IncidentMgmtMenuOverview:Title 0 UI-IncidentManagementOverview-IncidentByPriority-last-14-days SELECT Incident WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date priority 1 UI-IncidentManagementOverview-Last-14-days SELECT Incident WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date start_date:day_of_month 2 UI-IncidentManagementOverview-OpenIncidentByStatus SELECT Incident WHERE status NOT IN ('closed','rejected') status 3 UI-IncidentManagementOverview-OpenIncidentByAgent SELECT Incident WHERE status NOT IN ('closed','rejected') agent_id 4 UI-IncidentManagementOverview-OpenIncidentByCustomer SELECT Incident WHERE status NOT IN ('closed','rejected') org_id 1 IncidentManagement Incident 2 IncidentManagement Incident 3 IncidentManagement 0 Incident:Shortcuts fast 1 Incident:Shortcuts fast 2 Incident:Shortcuts 1 fast allow allow allow Incident id) ]]> Tickets:Related:OpenIncidents itop-incident-mgmt-itil/images/incident-red.svg yes id) ]]> Tickets:Related:OpenIncidents itop-incident-mgmt-itil/images/incident-red.svg yes id) ]]> Tickets:Related:OpenIncidents itop-incident-mgmt-itil/images/incident-red.svg yes Tickets:Related:OpenIncidents itop-incident-mgmt-itil/images/incident-red.dvg yes Tickets:Related:OpenIncidents itop-incident-mgmt-itil/images/incident-red.svg yes