﻿id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
13405	sum totalhours returns int instead decimal	Rochi	Russ Tyndall	"Trac 1.2.2

TimingAndEstimationPlugin 1.5.7b0

MariaDB 10.0.34


If I enter a decimal value for hours like 0.5 the totalhours field is always increased to the next integer value (here 1).

The code casts the newvalue with
{{{
#!sql
CAST( newvalue AS DECIMAL)
}}}

But if you look to the mysql or mariadb documentation ""DECIMAL"" is used as ""DECIMAL(10,0)"" so the scale is 0 (number of digits after the decimal point).
see
https://mariadb.com/kb/en/library/decimal/
https://dev.mysql.com/doc/refman/5.5/en/fixed-point-types.html

So the cast have to look like
{{{
#!sql
CAST( newvalue AS DECIMAL(10,2))
}}}

I've attached a patch."	defect	new	normal	TimingAndEstimationPlugin	normal				1.2
