Edgewall Software
Modify

Opened 8 years ago

Closed 7 years ago

#12586 closed defect (fixed)

KeyError is raised from query page with "milestone" as custom field and no milestones

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.14
Component: ticket system Version: 1.0.11
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix QueryModule raising a KeyError when no milestones are defined.

API Changes:
Internal Changes:

Description

How to reproduce:

  1. Remove milestone records
  2. Add milestone = text to [ticket-custom] section
  3. Visit /query page

Prior to 1.0.11, OperationalError: ambiguous column name: priority.value occurs. See also #12399.

I think batch-modify form in query page has similar issues.

Traceback (most recent call last):
  File "/venv/trac/1.0.13/lib/python2.5/site-packages/trac/web/main.py", line 562, in _dispatch_request
    dispatcher.dispatch(req)
  File "/venv/trac/1.0.13/lib/python2.5/site-packages/trac/web/main.py", line 249, in dispatch
    resp = chosen_handler.process_request(req)
  File "/venv/trac/1.0.13/lib/python2.5/site-packages/trac/ticket/query.py", line 1004, in process_request
    return self.display_html(req, query)
  File "/venv/trac/1.0.13/lib/python2.5/site-packages/trac/ticket/query.py", line 1121, in display_html
    data = query.template_data(context, tickets, orig_list, orig_time, req)
  File "/venv/trac/1.0.13/lib/python2.5/site-packages/trac/ticket/query.py", line 768, in template_data
    for opt in field['options']]
KeyError: 'options'

Attachments (0)

Change History (3)

comment:1 by Jun Omae, 7 years ago

Owner: set to Jun Omae
Release Notes: modified (diff)
Status: newassigned

Proposed changes in jomae.git@t12586.

comment:2 by Ryan J Ollos, 7 years ago

Changes look good and work well for me.

comment:3 by Jun Omae, 7 years ago

Resolution: fixed
Status: assignedclosed

Committed in [15232-15233] and merged in [15234-15235].

Modify Ticket

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