id summary reporter owner description type status priority component severity resolution keywords cc release 6179 MySQL Error shubham_chakraborty@… Russ Tyndall "Report execution failed: (1064, ""You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECIMAL) END as Estimated_work,\r\n CASE WHEN totalhours.value = '' OR totalhou' at line 10"") what is the query syntax error i need to change to make the timing and estimation plugin work in sync with Mysql database..? Here is the query for Ticket Hours report???? SELECT __color__, __style__, ticket, summary, component ,version, severity, milestone, status, owner, Estimated_work, Total_work, billable,_ord FROM ( SELECT p.value AS __color__, '' as __style__, t.id AS ticket, summary AS summary, -- ## Break line here component,version, severity, milestone, status, owner, CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0 ELSE CAST( EstimatedHours.value AS DECIMAL) END as Estimated_work, CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0 ELSE CAST( totalhours.value AS DECIMAL ) END as Total_work, CASE WHEN billable.value = '1' THEN 'Y' else 'N' END as billable, time AS created, changetime AS modified, -- ## Dates are formatted description AS _description_, -- ## Uses a full row changetime AS _changetime, reporter AS _reporter ,0 as _ord FROM ticket as t JOIN enum as p ON p.name=t.priority AND p.type='priority' LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours' AND EstimatedHours.Ticket = t.Id LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours' AND totalhours.Ticket = t.Id LEFT JOIN ticket_custom as billable ON billable.name='billable' AND billable.Ticket = t.Id WHERE t.status IN ($NEEDINFO, $REOPENED, $ASSIGNED, $CLOSED, $NEW, $ACCEPTED, $PENDING) AND billable.value in ($BILLABLE, $UNBILLABLE) UNION SELECT '1' AS __color__, 'background-color:#DFE;' as __style__, 0 as ticket, 'Total' AS summary, NULL as component,NULL as version, NULL as severity, NULL as milestone, 'Time Remaining: ' as status, CAST( SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0 ELSE CAST( EstimatedHours.value AS DECIMAL ) END) - SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0 ELSE CAST( totalhours.value AS DECIMAL ) END) AS CHAR(512)) as owner, SUM(CASE WHEN EstimatedHours.value = '' OR EstimatedHours.value IS NULL THEN 0 ELSE CAST( EstimatedHours.value AS DECIMAL ) END) as Estimated_work, SUM(CASE WHEN totalhours.value = '' OR totalhours.value IS NULL THEN 0 ELSE CAST( totalhours.value AS DECIMAL ) END) as Total_work, NULL as billable, NULL as created, NULL as modified, -- ## Dates are formatted NULL AS _description_, NULL AS _changetime, NULL AS _reporter ,1 as _ord FROM ticket as t JOIN enum as p ON p.name=t.priority AND p.type='priority' LEFT JOIN ticket_custom as EstimatedHours ON EstimatedHours.name='estimatedhours' AND EstimatedHours.Ticket = t.Id LEFT JOIN ticket_custom as totalhours ON totalhours.name='totalhours' AND totalhours.Ticket = t.Id LEFT JOIN ticket_custom as billable ON billable.name='billable' AND billable.Ticket = t.Id WHERE t.status IN ($NEEDINFO, $REOPENED, $ASSIGNED, $CLOSED, $NEW, $ACCEPTED, $PENDING) AND billable.value in ($BILLABLE, $UNBILLABLE) ) as tbl ORDER BY _ord ASC, ticket " defect closed high TimingAndEstimationPlugin blocker worksforme waiting-for-feedback 0.11