Modify

Opened 7 years ago

Closed 7 years ago

#1697 closed defect (invalid)

Hour reports not working with Trac 10.4 & MySQL 5.0

Reported by: duckie@… Owned by: 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 (1)

Il bisbetico domato.srt (69.5 KB) - added by anonymous 7 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago 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

comment:2 Changed 7 years ago by bobbysmith007

(In [2331]) re #1697

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

comment:3 Changed 7 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 7 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

comment:5 Changed 7 years ago 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

comment:6 Changed 7 years ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from reopened to closed

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

comment:7 Changed 7 years ago by idbill@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

I am having this problem.

What was the fix?

Trac 0.10.4 + mySQL 5.0.48 + TimeAndEstimationPlugin 0.4.9

Bill

comment:8 Changed 7 years ago by anonymous

  • Resolution set to invalid
  • Status changed from reopened to closed

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

Changed 7 years ago by anonymous

Add Comment

Modify Ticket

Action
as closed The owner will remain bobbysmith007.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.