Sidebar

Using iTop

Creating your iTop

iTop Customization

"How to" examples
DataModel

User Interface

Automation & Ticket management

Portal Customization

You are browsing the documentation for iTop 3.1 which is not the current version.

Consider browsing to iTop 3.2 documentation

Resolution delay taking Coverage window into account

Prerequisite: You must be familiar with the Syntax used in Tutorials and have already created an extension.

learning:
Display time spent on Ticket
level:
Beginner
domains:
XML, Stopwatch
min version:
2.1.0

In this tutorial, we suppose that you are calculating TTO and TTR taking into account Coverage Window, using SLA considering business hours extension, and you want to display the time spent let say in TTR, but ignoring the non-working periods.

Within a stopwatch we have 4 internal sub-items:

Code Label Meaning
timespent Elapsed total time spent within the states associated with the stopwatch - not accurate if stopwatch is running!
started Started when the stopwatch has started for the first time
laststart LastStart when the stopwatch has started for the last time - empty if stopwatch is stopped
stopped Stopped when the stopwatch was stopped for the last time - empty if stopwatch is running

Your need

Resolution delay will give you the time between those two internals: ttr_started and ttr_stopped. But that may not be what you want, as this delay is the total time between those two events.

You want is the real time spent by your support team to resolve a ticket, ignoring periods outside of the coverage window. This is exactly what is stored in the stopwatch sub-item timespent

iTop Essential & Professional

Within the ITSM Designer, go to the class UserRequest and press the new field icon: Add Field button
In the pop-up window, select

  • type = Stopwatch Value
  • Stopwatch = Select the stopwatch, in our case ttr
  • Value = Total time spent

Add this field to the presentation / details view.

In the Lifecycle tab, hide this field in states, where the stopwatch is running as, the displayed value is not pertinent

iTop Community

Create an iTop extension and declare in XML a field of the UserRequest class, like this one:

itop_design / classes / class@UserRequest
   <fields>
     <field id="ttr_timespent" xsi:type="AttributeSubItem" _delta="define">
     <target_attcode>ttr</target_attcode>
     <item_code>timespent</item_code>
     </field>
    </fields>
Sub-items must be explicitly declared in XML as field to be usable in OQL and displayed in screen.

You may display it or not in the details screen of a UserRequest, it will anyway be available in “Customize this list” view, in dashlets and OQL queries.

Here is an example of a timespent display versus stopwatch display:

  • The stopwatch was started and stopped multiple times, as a result, “Elapsed” does not correspond to the difference between “Started” and “Stopped”
  • 7*60s + 49s = 469s: Provider time spent is just a nice display of the “Elapsed” sub-item
  • It's an extract from this tutorial: Counting time waiting for 3rd party
3_1_0/customization/add-subitems.txt · Last modified: 2023/07/21 10:19 by 127.0.0.1
Back to top
Contact us