Ticket #4152 (closed defect: worksforme)
Opened 5 years ago
Last modified 4 years ago
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@… | ||
| Release Notes: | |||
| API Changes: | |||
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
comment:1 Changed 5 years ago by eblot
- Description modified (diff)
comment:2 Changed 5 years ago by Tim Hatch <trac@…>
Are you sure that the custom field is the culprit? The traceback seems like it's just not reading any values back from the database.
comment:3 Changed 5 years ago by andrewdied@…
This could be the same bug as #4198. I upgraded to 0.10.2 since I logged this ticket. I did a test using "3-2" in my custom field again, and three out of four times I got a "500 internal server error (Ticket 0 does not exist.)" The last time the ticket went in without errors.
I don't get the tracebacks in 0.10.2, but just the 500 internal server error. I'm thinking more and more this and #4198 are the same thing, just with different behavior because of the patch level. Feel free to close the appropriate one out.
comment:4 Changed 5 years ago by andrewdied@…
- Cc andrewdied@… added
comment:5 Changed 5 years ago by cboos
- Keywords solaris needinfo added
I couldn't reproduce this, but then it's probably due to the specifics of the system.
By any chance could we get a listing of all the custom fields used?
comment:6 Changed 5 years ago by andrewdied@…
- Resolution set to worksforme
- Status changed from new to closed
The Solaris box this was running is gone, and before I had the chance to upgrade it to 0.10.3 from 0.10.2. I migrated the system to a suse 10.2/trac 0.10.3 linux box, and haven't seen it since. I don't know what the fix was, but I haven't seen the error since.
Closing as worksforme, since I can't even reproduce it.
The only custom field I have is in the original description, a single text field. I'm not convinced, now, that it was the math portion.
comment:7 Changed 4 years ago by anonymous
The Solaris box this was running is gone, and before I had the chance to upgrade it to 0.10.3 from 0.10.2. I migrated the system to a suse 10.2/trac 0.10.3 linux box, stair railingsand haven't seen it since. I don't know what the fix was, but I haven't seen the error since.
Closing as worksforme, since I can't even reproduce it.
The only custom field I have is in the original description, a single text field. I'm not convinced, now, that it was the math portion.



(please use WikiFormatting to quote traceback)