Resolve time
The Resolve time field is available on the Incident [incident] and Request [sc_request] tables. This field allows for easy reporting on how long it takes for requests to be closed, and is stored as an integer number of seconds.
Business rule calculation
Specific business rules calculate the Resolve time field when the record is resolved or marked closed, and measures the difference between the Opened and Closed dates. The field is stored in the system as an integer number of seconds.
- On the Incident table, the field is calculated on closure by the business rule mark_closed. The following lines of code calculate the resolve time:
if (dataChange || current.calendar_stc.nil()) current.calendar_stc = gs.dateDiff(opened, resolved, true); - When the incident is closed directly, the calculation is based on the mark_closed business rule. The following lines of code calculate the resolve time:
if (dataChange || current.calendar_stc.nil()) current.calendar_stc = gs.dateDiff(opened, closed, true);