puhua.net

View My GitHub Profile

30 March 2020

iTop删减流程节点

事件工单的登记和处理均是IT相关人员。
在登记事件工单时,同时安排处理团队和人员,把‘指派’这个节点去掉,登记后,处理人员直接进行处理。

  1. 备份原文件
    cd /var/www/html/itop/datamodels/2.x/itop-incident-mgmt-itil  
    cp datamodel.itop-incident-mgmt-itil.xml datamodel.itop-incident-mgmt-itil.xml.bak  
    
  2. 确定在指派阶段的处理团队和处理人两个字段名称是:team_id和agent_id
     <state id="assigned">
         <inherit_flags_from>new</inherit_flags_from>
         <flags>
             <attribute id="team_id">
                 <mandatory/>
                 <must_prompt/>
                 <read_only/>
             </attribute>
             <attribute id="agent_id">
                 <mandatory/>
                 <must_prompt/>
                 <read_only/>
             </attribute>
             ......
    			
         <transitions>
             ......
             <transition id="ev_resolve">
                 <target>resolved</target>
                 <actions>
                     <action>
                         <verb>SetCurrentDate</verb>
                         <params>
                             <param xsi:type="attcode">resolution_date</param>
                         </params>
                     </action>
                     <action>
                         <verb>SetElapsedTime</verb>
                         <params>
                             <param xsi:type="attcode">time_spent</param>
                             <param xsi:type="attcode">start_date</param>
                             <param xsi:type="string">DefaultWorkingTimeComputer</param>
                         </params>
                     </action>
                     <action>
                         <verb>ResolveChildTickets</verb>
                         <params/>
                     </action>
                 </actions>
             </transition>
             ......
    
  3. 在登记工单,填写处理团队和处理人。
     <state id="new">
         <flags>
         ...
             <attribute id="team_id">
                 <mandatory/>   
                 <must_prompt/> 
             </attribute>
             <attribute id="agent_id">
                 <mandatory/>
                 <must_prompt/>
             </attribute>
         </flags>
    
  4. 去掉原来的'指派'出口,以'标记为已解决'代之。
         <!-- 
         <transition id="ev_assign">
             <target>assigned</target>
             <actions>
                 <action>
                     <verb>SetCurrentDate</verb>
                     <params>
                         <param xsi:type="attcode">assignment_date</param>
                     </params>
                 </action>
             </actions>
         </transition>
         -->
    							
         <transition id="ev_resolve">
             <target>resolved</target>
             <actions>
                 <action>
                     <verb>SetCurrentDate</verb>
                     <params>
                         <param xsi:type="attcode">resolution_date</param>
                     </params>
                 </action>
                 <action>
                     <verb>SetElapsedTime</verb>
                     <params>
                         <param xsi:type="attcode">time_spent</param>
                         <param xsi:type="attcode">start_date</param>
                         <param xsi:type="string">DefaultWorkingTimeComputer</param>
                     </params>
                 </action>
                 <action>
                     <verb>ResolveChildTickets</verb>
                     <params/>
                 </action>
             </actions>
         </transition>
    
  5. 用Toolkit工具更新代码