Modify

Opened 14 years ago

Last modified 7 years ago

#7642 assigned defect

Exception when adding a filter on the Hours page

Reported by: technik@… Owned by: EmeCas
Priority: normal Component: TracHoursPlugin
Severity: critical Keywords: Migration
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

We had the TracHoursPlugin installed on 0.11.7 and reinstalled it with 0.12 on a new machine.

When trying to add a filter to the hours query form, an exception is thrown:

AttributeError: 'list' object has no attribute 'setdefault'

Stacktrace:
File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 513, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 235, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/local/lib/python2.6/dist-packages/TracHoursPlugin-0.5.2-py2.6.egg/trachours/hours.py", line 234, in process_request
  return self.process_timeline(req)
File "/usr/local/lib/python2.6/dist-packages/TracHoursPlugin-0.5.2-py2.6.egg/trachours/hours.py", line 509, in process_timeline
  return self.display_html(req, query)
File "/usr/local/lib/python2.6/dist-packages/TracHoursPlugin-0.5.2-py2.6.egg/trachours/hours.py", line 615, in display_html
  constraint = constraints.setdefault(field, {})

Attachments (0)

Change History (8)

comment:1 Changed 14 years ago by anonymous

Severity: normalcritical

Same problem here after upgrade to trac 0.12 and plugin update to 0.5.2. Filters cannot be used.

comment:2 Changed 14 years ago by Ryan J Ollos

Description: modified (diff)
Owner: changed from Jeff Hammel to Ryan J Ollos
Status: newassigned

The error you see here is common when trying to use a 0.11 plugin under 0.12 due to a change in the Trac API. This may be fixed on the 0.12 branch already ... will test shortly.

comment:3 Changed 14 years ago by Ryan J Ollos

Summary: Adding filter in TracHours query form throws exception after migration vom 0.11 to 0.12Exception when adding a filter on the Hours page

comment:4 Changed 14 years ago by Ryan J Ollos

Confirmed still present on the 0.12 branch. The buttons to remove a filter are also not functional.

comment:5 Changed 14 years ago by Ryan J Ollos

(In [9618]) Fixed CSV export of data on the hours page by accounting for a change in the Trac API. In Trac 0.12, constraints is a list of dictionaries. Previously, it was just a dictionary. Fixes #7996.

The add filter function on the Hours page required a similar change. Refs #7642.

comment:6 Changed 11 years ago by Ryan J Ollos

Status: assignednew

comment:7 Changed 8 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

comment:8 Changed 7 years ago by EmeCas

Owner: set to EmeCas
Status: newassigned

Reassigning to maintainer

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain EmeCas.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.