Edgewall Software

Ticket #4152 (closed defect: worksforme)

Opened 2 years ago

Last modified 12 months 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@…

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:

  1. Create a custom field like above. Start or restart tracd. (Note: other trac implementations, like mod_python, were not tested.)
  2. 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.
  3. 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

Changed 2 years ago by eblot

  • description modified (diff)

(please use WikiFormatting to quote traceback)

Changed 2 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.

Changed 2 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.

Changed 2 years ago by andrewdied@…

  • cc andrewdied@… added

Changed 22 months 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?

Changed 22 months ago by andrewdied@…

  • status changed from new to closed
  • resolution set to worksforme

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.

Changed 12 months 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.

Add/Change #4152 (math in text custom ticket field causes traceback)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.