Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#4152 closed defect (worksforme)

math in text custom ticket field causes traceback

Reported by: andrewdied@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: 0.10
Severity: normal Keywords: solaris needinfo
Cc: andrewdied@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Emmanuel Blot)

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 (0)

Change History (7)

comment:1 by Emmanuel Blot, 18 years ago

Description: modified (diff)

(please use WikiFormatting to quote traceback)

comment:2 by Tim Hatch <trac@…>, 18 years ago

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 by andrewdied@…, 18 years ago

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 by andrewdied@…, 18 years ago

Cc: andrewdied@… added

comment:5 by Christian Boos, 18 years ago

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 by andrewdied@…, 18 years ago

Resolution: worksforme
Status: newclosed

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 by anonymous, 17 years ago

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.

Modify Ticket

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