Modify

Opened 6 years ago

Closed 5 years ago

#3818 closed defect (invalid)

AttributeError: 'Ticket' object has no attribute 'get_value_or_default'

Reported by: anonymous Owned by: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords: waiting-for-feedback
Cc: aleksdj@… Trac Release: 0.11

Description

With "timeandestimating with permissions" plugin there is an error each time I try to access to one ticket or list the timeline:

AttributeError: 'Ticket' object has no attribute 'get_value_or_default'

This is the python traceback:

Python Traceback

Most recent call last:
File "C:\Python25\Lib\site-packages\trac\web\main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "C:\Python25\Lib\site-packages\trac\web\main.py", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File "C:\Python25\Lib\site-packages\trac\ticket\web_ui.py", line 170, in process_request
  return self._process_ticket_request(req)
File "C:\Python25\Lib\site-packages\trac\ticket\web_ui.py", line 434, in _process_ticket_request
  req.perm('ticket', id, version).require('TICKET_VIEW')
File "C:\Python25\Lib\site-packages\trac\perm.py", line 545, in require
  if not self._has_permission(action, resource):
File "C:\Python25\Lib\site-packages\trac\perm.py", line 537, in _has_permission
  check_permission(action, perm.username, resource, perm)
File "C:\Python25\Lib\site-packages\trac\perm.py", line 424, in check_permission
  perm)
File "build\bdist.win32\egg\timingandestimationplugin\ticket_policy.py", line 22, in check_permissionFile "build\bdist.win32\egg\timingandestimationplugin\ticket_policy.py", line 34, in check_ticket_access

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by bobbysmith007

Which version of trac are you using? In my trac '0.11stable-r7510' I have the 'get_value_or_default' function available.

If you have IPython installed you might try running the following commands to find out the version number and which functions are available on your version of ticket.

import trac
from trac.env import Environment
from trac.ticket import Ticket

trac.__version__ # this will tell you the version number

e = Environment('/path/to/trac/dir')
t = Ticket(e, 1)

dir(t) # should tell you which items are available

comment:2 Changed 5 years ago by bobbysmith007

  • Keywords waiting-for-feedback added

comment:3 Changed 5 years ago by bobbysmith007

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

Assuming that this works since I have had no feedback

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bobbysmith007. Next status will be 'closed'.
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.