The SLACalculatorNG.calculateSLARange() function queries for the desired records based on a date range, and filters for records which are active and not paused. If the job is running for a long time and the task_sla record changes to either inactive or paused, the job does not check for this update and recalculates the record.
The calculation time used is the time the job started, so the calculation is done to a record that is not supposed to be updated, and this calculation is done for the wrong time.
Steps to Reproduce
1. Put a strategic sleep statement into the SLACalculatorNG.calculateSLARange() function to make it sleep for several minutes after it is started. The gs.sleep statement should be added between the lines. sc.calcTaskSLAs(); and sc.updateTaskSLAs(); will introduce an extra delay after the Task SLAs have been loaded and calculated but before these updates are saved to the records.
2. Start one of the associated SLA update jobs that you know select a particular task_sla record you have active and not paused.
3. Update the associated incident to cause the task_sla to be paused. After the job has started and while it is sleeping, note the calculated values in the task_sla record.
4. Check the task_sla again after the SLA update job wakes up and completes running. Note how the values in the task_sla record have been recalculated to the time when the job was started. They should not have been updated because the record was paused.
There is no current workaround for this problem.
Related Problem: PRB613726