Opened 4 years ago

Closed 2 years 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


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/", line 450, in _dispatch_request
    File "/usr/lib/python2.7/dist-packages/trac/web/", line 206, in dispatch
    File "/usr/lib/python2.7/dist-packages/trac/ticket/", line 182, in process_request
    File "/usr/lib/python2.7/dist-packages/trac/ticket/", line 536, in _process_ticket_request
    File "/usr/lib/python2.7/dist-packages/trac/ticket/", line 1264, in _insert_ticket_data
    File "build/bdist.linux-x86_64/egg/MultipleWorkflowPlugin/", line 200, in render_ticket_action_control 

Attachments (0)

Change History (3)

comment:1 Changed 2 years ago by Cinc-th

Owner: changed from Ermal Memushaj to Cinc-th
Status: newassigned

comment:2 Changed 2 years ago by Cinc-th

Status: assignedaccepted

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/", line 522, in _dispatch_request
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/web/", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/ticket/", line 169, in process_request
    return self._process_ticket_request(req)
  File "/Users/cinc/projects/ReqVirtualEnv/lib/python2.7/site-packages/trac/ticket/", 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/", line 1518, in _insert_ticket_data
    req, ticket, action)
  File "build/bdist.macosx-10.8-intel/egg/multipleworkflow/", 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:

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

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
reopen_verified.operations = set_resolution
reopen_verified.set_resolution=from verified
reopen_verified.permissions = TICKET_CREATE

reopen_approved = approved -> reopened = 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 the Test case and mark
verify.operations = set_resolution
verify.permissions = TICKET_MODIFY
Last edited 2 years ago by Cinc-th (previous) (diff)

comment:3 Changed 2 years ago by Cinc-th

Resolution: fixed
Status: acceptedclosed

[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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Cinc-th.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.