Ticket #4152 (closed defect: worksforme)
math in text custom ticket field causes traceback
| Reported by: | andrewdied@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | ticket system | Version: | 0.10 |
| Severity: | normal | Keywords: | solaris needinfo |
| Cc: | andrewdied@… |
Description (last modified by eblot) (diff)
Using python 2.5.0 and trac 0.10 with postgres 8.1.3 on solaris 10, I created a single custom field. I used tracd with the --port, -r, -d, --pidfile, --basic-auth flags.
The custom field:
[ticket-custom] rnw_id = text rnw_id.label = Ref no. from helpdesk
In the helpdesk software the ticket numbers are formatted DATE-NUMBER, so the second ticket for today would be 20061113-000001. Though I have specified the field as text, python tries to do the math implied by the ticket number format.
Steps to reproduce:
- Create a custom field like above. Start or restart tracd. (Note: other trac implementations, like mod_python, were not tested.)
- In the "Ref no. from helpdesk" field type in "3-2" without the quotes, or a formatted DATE-NUMBER like 20061113-000001. Submit the ticket.
- See the error. Note: the data is properly put in the database, and edits of the ticket are not affected.
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 356, in dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 224, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/local/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 302, in process_request
get_reporter_id(req, 'author'))
File "/usr/local/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 562, in _insert_ticket_data
req.hdf['title'] = '#%d (%s)' % (ticket.id, ticket['summary'])
File "/usr/local/lib/python2.5/site-packages/trac/ticket/model.py", line 107, in __getitem__
return self.values[name]
KeyError: 'summary'
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


