Edgewall Software
Modify

Opened 17 years ago

Closed 14 years ago

#5562 closed defect (worksforme)

SQL errors not showing up in report view

Reported by: Dave Abrahams <dave@…> Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: devel
Severity: normal Keywords: review bitesized
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When an SQL query fails, due to an incompatibility between the reports template and ticket/report.py, the message isn't displayed. This patch fixes it:

  • trac/ticket/report.py

     
    274274        try:
    275275            cols, results = self.execute_report(req, db, id, sql, args)
    276276        except Exception, e:
    277             data['message'] = 'Report execution failed: ' + to_unicode(e)
     277            data['report']['message'] = 'Report execution failed: ' + to_unicode(e)
    278278            return 'report_view.html', data, None
    279279
    280280        sort_col = req.args.get('sort', '')

Attachments (0)

Change History (2)

comment:1 by Remy Blank, 15 years ago

Keywords: review bitesized added

comment:2 by Christian Boos, 14 years ago

Milestone: next-minor-0.12.x
Resolution: worksforme
Status: newclosed

Well, the error message goes through, so something must have been fixed in the meantime.

However it was poorly formatted, which is something I improved in r10395.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.