Resolve time

The Resolve time field is available on the Incident [incident] and Request [sc_request] tables.

Business rules calculate the field when the record is marked closed, and measure the difference between the Opened and Closed dates. This field allows for easy reporting on how long it takes for requests to be closed.

The field is stored in the system as an integer number of seconds.

Business rule calculation:

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:
 current.calendar_stc = 
    gs.dateDiff(current.opened_at.getDisplayValue( ), current.closed_at.getDisplayValue( ), true);
On the Request table, the field is calculated on closure by the business rule Mark Request Closed. The following line of code calculates the resolve time:
 current.calendar_stc = 
   gs.dateDiff(current.opened_at.getDisplayValue( ), current.closed_at.getDisplayValue( ), true);