Modify

Opened 7 years ago

Closed 7 years ago

#2056 closed defect (fixed)

Hour reports not working with Trac 10.4 & MySQL 5.0 & timeandestimationplugin 0.9.4

Reported by: idbill@… Owned by: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

All Hour reports indicate some variation of SQL syntax error.

The installation of went smoothly just like the docs indicate.
Note that there is NOT a report_version table in the db... but looking thru the code, that table looks to have been a legacy artifact still being shown.

There is one ticket, that has 2 hours
Estimated Number of Hours: 2h 0
Billable?: No Total Hours: 2h

What other info do you need?

Bill

Ticket hours shows:
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 'VARCHAR(1024)) as owner,\n SUM(CASE WHEN EstimatedHours.value = OR Es' at line 45")

Hours with Desc shows:
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 'created, modified, -- ## Dates are formatted\n,_description_\n-- _changet' at line 3")

Grouped by component:
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 'VARCHAR(1024)) as owner,\n SUM(CASE WHEN EstimatedHours.value = OR Esti' at line 51")

Component w/ Desc shows:
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 'VARCHAR(1024)) as owner,\n SUM(CASE WHEN EstimatedHours.value = OR Esti' at line 49")

Milestone shows:
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 'VARCHAR(1024)) as owner,\n SUM(CASE WHEN EstimatedHours.value = OR Estim' at line 50")

Milestone w/desc shows:
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 'VARCHAR(1024)) as owner,\n SUM(CASE WHEN EstimatedHours.value = OR Estim' at line 52")

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by anonymous

i'm having the same issue, has there been any remedy?

comment:2 Changed 7 years ago by anonymous

Edit your reports by changing VARCHAR(1024) to CHAR(1024) to make it work for MySQL.

comment:3 Changed 7 years ago by anonymous

I also had to edit Ticket Hours with Description Report so that the beginning part looks like the following:

SELECT color, style, ticket, summary, component ,version, severity,

milestone, status, owner, Estimated_work, Total_work, billable,

_description_
,_ord

comment:4 Changed 7 years ago by anonymous

Sorry, the last post applied formatting. Here you go:

SELECT __color__,  __style__,  ticket, summary, component ,version, severity,
 milestone, status, owner, Estimated_work, Total_work, billable,
_description_
,_ord

comment:5 Changed 7 years ago by idbill@…

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

That worked.

Ok... this is a more complete run-down of what I did:

  • change the references in the file reports.py
  • recompile the egg
  • reinstall the new egg into trac & restart apache
  • then within trac....
  • call up each report
  • get the error, then click on 'edit report'
  • find the varchar(1024) entry and remove it
  • find the line 'created, modified, -- ## Dates are formatted' and remove it
  • then revisit the report page!

Bill

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bobbysmith007. Next status will be 'closed'.
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.