Ticket #2334 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Ticket Work Summary report fails

Reported by: kjdavies Assigned to: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I've got Timing and Estimation Plugin installed, it seems the reports from 'Milestone Work Summary' through 'Ticket Hours Grouped by Milestone with Description' work (no data present so they're all empty, but at least they run).

'Ticket Work Summary Report' does not run. When I try, I get:

Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/web/api.py", line 339, in send_error

'text/html')

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/web/chrome.py", line 670, in render_template

if not req.session or not int(req.session.get('accesskeys', 0)):

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/web/api.py", line 168, in getattr

value = self.callbacks[name](self)

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/web/main.py", line 255, in _get_session

return Session(self.env, req)

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/web/session.py", line 53, in init

self.get_session(req.authname, authenticated=True)

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/web/session.py", line 74, in get_session

(sid, int(authenticated)))

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/db/util.py", line 50, in execute

return self.cursor.execute(sql_escape_percent(sql), args)

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6368-py2.5.egg/trac/db/util.py", line 50, in execute

return self.cursor.execute(sql_escape_percent(sql), args)

ProgrammingError?: current transaction is aborted, commands ignored until end of transaction block

Attachments

Change History

12/28/07 20:15:54 changed by bobbysmith007

(In [2948]) re #2334 closes #2335

Fixed error caused by printing to std out rather than to the trac log. There might also be an underlying error, but I cannot recreate it right now (all reports work for me with this version of the plugin).

01/15/08 19:08:32 changed by bobbysmith007

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

Is this still a bug, or has it been fixed? I guess reopen if it hasnt

03/18/08 22:18:27 changed by anonymous

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

I get same error today using T&E plugin 0.6.3 (rev. 3363) with Trac 0.11b1:

Traceback (most recent call last):
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\web\api.py", line 339, in send_error
    'text/html')
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\web\chrome.py", line 670, in render_template
    if not req.session or not int(req.session.get('accesskeys', 0)):
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\web\api.py", line 168, in __getattr__
    value = self.callbacks[name](self)
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\web\main.py", line 255, in _get_session
    return Session(self.env, req)
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\web\session.py", line 48, in __init__
    self.get_session(sid)
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\web\session.py", line 74, in get_session
    (sid, int(authenticated)))
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\db\util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5.egg\trac\db\util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: current transaction is aborted, commands ignored until end of transaction block

when I run the Ticket Work Summary report. If I add t.summary to the "GROUP By" statement, then it appears to work OK.

GROUP By t.id, t.summary

I tried this after changing the definition of BILLABLE from 1 to 0 in the URL and seeing this error:

Report execution failed: column "t.summary" must appear in the GROUP BY clause or be used in an aggregate function

The other 8 reports all work.

(follow-up: ↓ 5 ) 03/19/08 16:06:29 changed by bobbysmith007

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

(In [3398]) closes #2334

Added that t.summary to the group by clause as that did not change my results with SQLite and was preventing someone from using it with a different database

What database are you using?

(in reply to: ↑ 4 ) 03/20/08 18:33:06 changed by smrobinson62@gmail.com

What database are you using?

PostgreSQL 8.1.3 (on a test server - we're more up-to-date on the actual Trac server but I don't know if that matters).

Thanks for the quick fix - works for me.

On another note - when I added the sample "enterprise" workflow from the Trac 0.11b1 distribution, which has '_' in some of the status names such as in_QA and post_review, the T&E report manager upgrade added the new statuses to the queries OK but when I executed queries from the Management tab, they failed complaining about missing $IN (and when I defined $IN, missing $POST). The query had $IN_QA and $POST_REVIEW defined so it would seem underscore is not a legal character. Once I removed the underscores from the status names in the workflow, T&E reports executed just fine. I don't know if this is a problem with Python, PostgreSQL, or something else (I'm a C++/Java developer, not Python nor SQL).

03/20/08 19:05:52 changed by bobbysmith007

Thanks for the details... I will look into that, but my guess is that trac doesnt appreciate '_' in its dynamic report variables. With this knowledge, though, I should be able to just remove those from the variable names.

see #2763


Add/Change #2334 (Ticket Work Summary report fails)




Change Properties
Action