Modify

Opened 4 years ago

Closed 20 months ago

#10524 closed defect (fixed)

Changing the ticket type fails when ticket status does not exist

Reported by: eelke.strooisma@… Owned by: Cinc-th
Priority: normal Component: MultipleWorkflowPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Changing the ticket type gives the error below when the new ticket type does not have the ticket status of the old ticket type.

Trac detected an internal error: KeyError: '_reset'

Most recent call last:

    File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 450, in _dispatch_request
    File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 206, in dispatch
    File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 182, in process_request
    File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 536, in _process_ticket_request
    File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 1264, in _insert_ticket_data
    File "build/bdist.linux-x86_64/egg/MultipleWorkflowPlugin/MultipleWorkflowPlugin.py", line 200, in render_ticket_action_control 

Attachments (0)

Change History (3)

comment:1 Changed 20 months ago by Cinc-th

  • Owner changed from ermal to Cinc-th
  • Status changed from new to assigned

comment:2 Changed 20 months ago by Cinc-th

  • Status changed from assigned to accepted

I can confirm the bug with 0.12.5:

13:26:41 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/web/main.py", line 522, in _dispatch_request
    dispatcher.dispatch(req)
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/web/main.py", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/ticket/web_ui.py", line 169, in process_request
    return self._process_ticket_request(req)
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/ticket/web_ui.py", line 569, in _process_ticket_request
    get_reporter_id(req, 'author'), field_changes)
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/ticket/web_ui.py", line 1518, in _insert_ticket_data
    req, ticket, action)
  File "build/bdist.macosx-10.8-intel/egg/multipleworkflow/workflow.py", line 211, in render_ticket_action_control
    this_action = self.actions[action]
KeyError: '_reset'
Old ticket type:
Testfall with current status approved
New ticket type:
defect which doesn't have a status approved

Configuration in trac.ini:

[ticket-workflow]
accept = new,assigned,accepted,reopened -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,accepted,reopened -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,accepted,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY

[ticket-workflow-Testfall]
leave = * -> *
leave.default = 1
leave.operations = leave_status

approve = new, reopened -> approved
approve.operations = del_resolution
approve.permissions = TICKET_MODIFY

reopen_verified = closed -> reopened
reopen_verified.name= reopen
reopen_verified.operations = set_resolution
reopen_verified.set_resolution=from verified
reopen_verified.permissions = TICKET_CREATE

reopen_approved = approved -> reopened
reopen_approved.name = Reopen
reopen_approved.operations = set_resolution
reopen_approved.set_resolution=from approved
reopen_approved.permissions = TICKET_CREATE

remove = new, reopened, approved, closed -> removed
remove.operations = set_resolution
remove.set_resolution= removed
remove.permissions = TICKET_MODIFY

verify = approved -> closed
verify.name=Check the Test case and mark
verify.operations = set_resolution
verify.set_resolution=verified
verify.permissions = TICKET_MODIFY
Last edited 20 months ago by Cinc-th (previous) (diff)

comment:3 Changed 20 months ago by Cinc-th

  • Resolution set to fixed
  • Status changed from accepted to closed

[14566]: Offer a ticket action to reset the status when ticket has an invalid status after a type change.

An invalid status is any status which is not defined in the active workflow.

Add Comment

Modify Ticket

Action
as closed The owner will remain Cinc-th.
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.