Ticket bizmodel,searchable,requestmgmt,popular false autoincrement ticket_request id status true rank new 10 waiting_for_approval 20 approved 30 rejected 40 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 service_request request_type service_request true 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 origin phone true org_id ]]> approver_id Person true DEL_MANUAL false approver_id email org_id AND s.status != 'obsolete']]> service_id Service true DEL_MANUAL false service_id name service_id AND request_type = :this->request_type 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 solution true html pending_reason true id AND status NOT IN ('rejected','resolved','closed')]]> parent_request_id UserRequest true DEL_MANUAL parent_request_id ref 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_request_id add_remove 0 0 public_log true 1 2 3 4 user_satisfaction 1 true user_commment true 1 HIGHLIGHT_CLASS_WARNING images/user-request-deadline.svg 2 HIGHLIGHT_CLASS_CRITICAL images/user-request-escalated.svg 3 HIGHLIGHT_CLASS_NONE images/user-request-closed.svg assigned SetCurrentDate assignment_date escalated_tto waiting_for_approval 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 new approved rejected resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets waiting_for_approval escalated_tto assigned SetCurrentDate assignment_date resolved SetCurrentDate resolution_date SetElapsedTime time_spent start_date DefaultWorkingTimeComputer ResolveChildTickets new new 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_request_id') == $this->GetKey())) { $this->m_aCheckIssues[] = Dict::Format('Class:UserRequest/Error:CannotAssignParentRequestIdToSelf'); } }]]> /** 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 person 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 $sKnownErrorClass 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(), $aTickets)) { $aTickets[$oRequest->GetKey()] = true; $oRequest->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_request_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_request_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 UpdateImpactedItems(); }]]> false protected Overload-DBObject SetIfNull('last_update', time()); $this->SetIfNull('start_date', time()); }]]> false protected Overload-DBObject Set('last_update', time()); $this->UpdateChildRequestLog(); }]]>
10 20 30 40 50 10 10 20 30 40 50 60 20 10 20 30 40 50 60 10 20 30 40 20 10 20 30 30 10 20 30 40 50 60 70 80 70 10 10 20 30 40 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 240 10 20 30 40 50 60
5 0 10 0 Organization:Overview:UserRequests itop-welcome-itil/images/user-request-deadline.svg Menu:UserRequest:OpenRequests SELECT UserRequest WHERE status != "closed" AND org_id=:this->id status new,assigned,escalated_tto,escalated_ttr,resolved 30 0 Organization:Overview:MyUserRequests SELECT UserRequest AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved") AND org_id=:this->id true 1 Organization:Overview:Tickets SELECT Ticket WHERE org_id = :this->id finalclass count attribute desc
1 0 Menu:RequestManagement itop-welcome-itil/images/user-request-deadline.svg Menu:UserRequest:OpenRequests SELECT UserRequest WHERE status != "closed" status new,assigned,escalated_tto,escalated_ttr,resolved 1 UI:WelcomeMenu:MyCalls SELECT UserRequest AS i WHERE i.agent_id = :current_contact_id AND status NOT IN ("closed", "resolved") true 30 0 RequestManagement DashboardLayoutTwoCols UI:RequestMgmtMenuOverview:Title 0 0 UI-RequestManagementOverview-RequestByType-last-14-days SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date request_type 1 0 UI-RequestManagementOverview-Last-14-days SELECT UserRequest WHERE DATE_SUB(NOW(), INTERVAL 14 DAY) < start_date start_date:day_of_month 2 0 UI-RequestManagementOverview-OpenRequestByStatus SELECT UserRequest WHERE status NOT IN ('closed','rejected') status 3 0 UI-RequestManagementOverview-OpenRequestByAgent SELECT UserRequest WHERE status NOT IN ('closed','rejected') agent_id 4 0 UI-RequestManagementOverview-OpenRequestByType SELECT UserRequest WHERE status NOT IN ('closed','rejected') finalclass 5 0 UI-RequestManagementOverview-OpenRequestByCustomer SELECT UserRequest WHERE status NOT IN ('closed','rejected') org_id 1 RequestManagement UserRequest 2 RequestManagement UserRequest 3 RequestManagement 0 UserRequest:Shortcuts fast 1 UserRequest:Shortcuts fast 2 UserRequest:Shortcuts 1 fast 3 UserRequest:Shortcuts fast