Edgewall Software

Opened 8 years ago

Last modified 7 years ago

#12586 closed defect

KeyError is raised from query page with "milestone" as custom field and no milestones — at Version 1

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'

Change History (1)

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.

Note: See TracTickets for help on using tickets.