Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11944 closed defect (fixed)

Workflow with MilestoneOperation is not working

Reported by: Franz Mayer <franz.mayer@…> Owned by: Ryan J Ollos
Priority: high Milestone: 1.1.4
Component: ticket system Version: 1.1.3
Severity: critical Keywords: workflow
Cc: Branch:
Release Notes:

Fixed: custom workflow attributes would raise a KeyError.

API Changes:
Internal Changes:

Description

We use custom ticket-workflow, using MilestoneOperation (see #10553 for details).

Trac 1.1.3 throws a KeyError when parsing workflow (it worked with Trac 1.1.1):

ERROR: Internal Server Error:
Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 551, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 190, in dispatch
    self._pre_process_request(req, chosen_handler)
  File "build\bdist.win32\egg\trac\web\main.py", line 363, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "build\bdist.win-amd64\egg\acct_mgr\api.py", line 476, in pre_process_request
    req.perm.has_permission('ACCTMGR_USER_ADMIN'):
  File "build\bdist.win32\egg\trac\perm.py", line 572, in has_permission
    return self._has_permission(action, resource)
  File "build\bdist.win32\egg\trac\perm.py", line 586, in _has_permission
    check_permission(action, perm.username, resource, perm)
  File "build\bdist.win32\egg\trac\perm.py", line 483, in check_permission
    perm)
  File "build\bdist.win32\egg\trac\perm.py", line 292, in check_permission
    get_user_permissions(username)
  File "build\bdist.win32\egg\trac\perm.py", line 411, in get_user_permissions
    actions = self.get_actions_dict()
  File "build\bdist.win32\egg\trac\perm.py", line 352, in get_actions_dict
    for requestor in self.requestors:
  File "build\bdist.win32\egg\trac\core.py", line 82, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "build\bdist.win32\egg\trac\core.py", line 208, in __getitem__
    component = cls(self)
  File "build\bdist.win32\egg\trac\core.py", line 144, in __call__
    self.__init__()
  File "build\bdist.win32\egg\trac\ticket\api.py", line 266, in __init__
    [c.__class__.__name__ for c in self.action_controllers])
  File "build\bdist.win32\egg\trac\config.py", line 778, in __get__
    for impl in self.xtnpt.extensions(instance):
  File "build\bdist.win32\egg\trac\core.py", line 82, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "build\bdist.win32\egg\trac\core.py", line 208, in __getitem__
    component = cls(self)
  File "build\bdist.win32\egg\trac\core.py", line 144, in __call__
    self.__init__()
  File "build\bdist.win32\egg\trac\ticket\default_workflow.py", line 131, in __init__
    self.actions = self.get_all_actions()
  File "build\bdist.win32\egg\trac\ticket\default_workflow.py", line 441, in get_all_actions
    actions = parse_workflow_config(self.ticket_workflow_section.options())
  File "build\bdist.win32\egg\trac\ticket\default_workflow.py", line 75, in parse_workflow_config
    if isinstance(allowed_attrs[attribute], int):
KeyError: u'milestone'

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 9 years ago

Milestone: 1.1.4
Owner: set to Ryan J Ollos
Status: newassigned

Possible regression from #11850.

comment:2 by Ryan J Ollos, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [13744]. PEP-0008 changes to MilestoneOperation in [13745].

comment:3 by Ryan J Ollos, 9 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos 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.