Modify ↓
Opened 14 years ago
Last modified 8 years ago
#7271 new defect
[Patch] Reports not working with Postgres 8.4 (TimingAndEstimation plugin)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | ClientsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
The reports Ticket Hours Grouped By Client and Ticket Hours Grouped By Client with Description that are viewed by TimingAndEstimation plugin are sending invalid SQL statement to the database.
The description of the problem is attached in this ticket.
The following piece of code resolved the problem:
-
reports.py
70 70 component as __component__,version, severity, milestone, status, owner, 71 71 CAST(estimatedhours.value as DECIMAL) as estimate_work, 72 72 CAST(totalhours.value as DECIMAL) as Total_work, 73 CASE WHEN billable.value = 1THEN 'Y'73 CASE WHEN billable.value = ($BILLABLE) THEN 'Y' 74 74 else 'N' 75 75 END as billable, 76 76 time AS created, changetime AS modified, -- ## Dates are formatted … … 131 131 132 132 WHERE t.status IN ($NEW, $ASSIGNED, $REOPENED, $CLOSED) 133 133 AND billable.value in ($BILLABLE, $UNBILLABLE) 134 GROUP BY client.value 134 GROUP BY client.value, t.component 135 135 ) as tbl 136 136 ORDER BY __group__, _ord ASC,ticket 137 137 """ … … 153 153 component as __component__,version, severity, milestone, status, owner, 154 154 CAST(estimatedhours.value as DECIMAL) as estimate_work, 155 155 CAST(totalhours.value as DECIMAL) as Total_work, 156 CASE WHEN billable.value = 1THEN 'Y'156 CASE WHEN billable.value = ($BILLABLE) THEN 'Y' 157 157 else 'N' 158 158 END as billable, 159 159 time AS created, changetime AS modified, -- ## Dates are formatted … … 214 214 215 215 WHERE t.status IN ($NEW, $ASSIGNED, $REOPENED, $CLOSED) 216 216 AND billable.value in ($BILLABLE, $UNBILLABLE) 217 GROUP BY client.value 217 GROUP BY client.value, t.component 218 218 ) as tbl 219 219 ORDER BY __group__, _ord ASC,ticket 220 220 """
Attachments (2)
Change History (3)
Changed 14 years ago by
Attachment: | problem1.log added |
---|
comment:1 Changed 8 years ago by
Owner: | Colin Guthrie deleted |
---|
Note: See
TracTickets for help on using
tickets.
Wrong type comparation