Ticket #1697 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

Hour reports not working with Trac 10.4 & MySQL 5.0

Reported by: duckie@parnet.fi Assigned to: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

E.g. when opening 'ticket hours grouped by component' report the following error message appears:

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 'REAL) as Estimated_work,\n CAST(totalhours.value as REAL) as Total_work,\n ' at line 11")

This error seems to be related to the fact that MySQL doesn't support casting to REAL. (http://dev.mysql.com/doc/refman/5.0/en/differences-from-ansi.html).

I haven't had time to test it yet but I guess the problem could be solved by replacing REAL with DECIMAL.

Attachments

Il bisbetico domato.srt (69.5 kB) - added by anonymous on 01/19/08 18:17:08.

Change History

06/25/07 15:15:35 changed by bobbysmith007

Hrmmm...

I was really hoping that we had finally worked up reports that were reliably cross database </grumble>.

I just tested casting as decimal in sqlite, mysql5, and a recent version of postgres and it worked so I will change the reports, and post a new version of the plugin in a few moments (it will show up in this log when I do).

Thanks for the good bug report,

Russ

06/25/07 15:58:45 changed by bobbysmith007

(In [2331]) re #1697

Changed REAL to DECIMAL in all reports and bumped the version number up to 0.4.2

06/28/07 15:24:47 changed by anonymous

  • status changed from new to closed.
  • resolution set to fixed.

08/13/07 13:11:54 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

MySQL 5.0 does not like the "CAST(t.id as text) as ticket" in developers work summary.

Fixed by changing to "t.id as ticket" which is used also in milestone work summary

08/13/07 15:34:29 changed by anonymous

Your fix will not work for strongly typed databases (read postgres) because it wants the union to be of the same type. I will attempt to find a valid cross database type to cast to.

I may not get to this for a few days. Thanks for the bug report,

Russ

08/22/07 19:36:26 changed by bobbysmith007

  • status changed from reopened to closed.
  • resolution set to fixed.

closes #1697 I was wrong about this, It was just a leftover quirk and has been removed

closes #901 reports now contain time remaining

closes #1958 added case statements all over the place to better support postegres when there are null/empty values

closes #1959 changed the work summary report to include links to the ticket and ticket summaries

Now at version 0.4.9

09/19/07 06:17:00 changed by idbill@planx.com

  • status changed from closed to reopened.
  • resolution deleted.

I am having this problem.

What was the fix?

Trac 0.10.4 + mySQL 5.0.48 + TimeAndEstimationPlugin? 0.4.9

Bill

09/19/07 06:20:04 changed by anonymous

  • status changed from reopened to closed.
  • resolution set to invalid.

nm this isn't a cast issue... but a problem with mysql5.0 nevertheless.

01/19/08 18:17:08 changed by anonymous

  • attachment Il bisbetico domato.srt added.

Add/Change #1697 (Hour reports not working with Trac 10.4 & MySQL 5.0)




Change Properties
Action