Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2862 closed defect (fixed)

MySQL 5 Updates so Reports Run

Reported by: jsteffan@… Owned by: bobbysmith007
Priority: high Component: TimingAndEstimationPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.10

Description

We have needed to make some changes to the trac0.10 branch to get management reports to run.
Attached is a patch that fixes the issues we have found.

Attachments (1)

reports.py.patch (3.7 KB) - added by jsteffan@… 7 years ago.
SQL Updates by Julia Rhodes

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by jsteffan@…

SQL Updates by Julia Rhodes

comment:1 Changed 7 years ago by cshelton

This issue also seems to affect the trac0.11 branch. The patch mostly works, changing VARCHAR to CHAR, but there was one piece of the patch rejected:

$ more reports.py.rej 
***************
*** 237,246 ****
      "sql": """
  SELECT __color__,  __style__,  ticket, summary, component ,version, severity,
   milestone, status, owner, Estimated_work, Total_work, billable
- --## ,created,  modified,         -- ## Dates are formatted
  ,_description_
- --## _changetime,
- --## _reporter
  ,_ord
  
  FROM (
--- 237,246 ----
      "sql": """
  SELECT __color__,  __style__,  ticket, summary, component ,version, severity,
   milestone, status, owner, Estimated_work, Total_work, billable
+ -- ## ,created,  modified,         -- ## Dates are formatted
  ,_description_
+ -- ## _changetime,
+ -- ## _reporter
  ,_ord
  
  FROM (

comment:2 Changed 7 years ago by jsteffan@…

Without the change to the format of the comments, this is an invalid MySQL5 statement.
http://dev.mysql.com/doc/refman/5.0/en/comments.html

Any valid comment syntax would be of value, the above patch was just a quick fix that was meant to be as non-disruptive as possible. Is the issue this breaks with other engines?

comment:3 Changed 7 years ago by bobbysmith007

Nice fix. That is lame that mysql requires whitespace there.

I will apply this next time i open this to work on it. Till then I will leave it open so others can find it.

comment:4 Changed 7 years ago by bobbysmith007

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

(In [3520]) closes #2862

version 0.5.6 update reports sql to be mysql 5 compatible

comment:5 Changed 7 years ago by bobbysmith007

(In [3521]) closes #2862 closes #2763

Fixed reports for mysql. Also made the plugin handle status names that contain an underscore.

version 0.6.5

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.