MantisBT: master-2.21 5bade1d5

Author Committer Branch Timestamp Parent
cproensa dregad master-2.21 2019-05-30 06:04:18 master-2.21 654948d0
Affected Issues  0025781: Summary statistics db error message

Fix mssql summary error

When computing SUM & AVG functions, sqlserver uses the column
datatype, which is INT. This datatype can be overflowed when a big
number of issues are included, since we are adding the total number
of seconds.

In that case, use an explicit cast to BIGINT to avoid that error.
Other databases are not affected because they use a runtime data
type allowing bigger integers.

The stats array is initialized to zero, to return a properly formatted
value array when there aren't any issues.

Fixes 0025781

mod - core/summary_api.php Diff File