MantisBT: master 49539f33

Author Committer Branch Timestamp Parent
cproensa dregad master 2019-05-30 02:04 master 4cae8782
Affected Issues  0025781: Summary statistics db error message
Changeset

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
PR https://github.com/mantisbt/mantisbt/pull/1516

mod - core/summary_api.php Diff File