Modify

Opened 12 years ago

Closed 12 years ago

#10327 closed defect (fixed)

OperationalError: no such column: estimatedhours when submitting changes

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: TracHoursPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

How to Reproduce

While doing a POST operation on /ticket/2, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__EDITOR__1': u'wysiwyg',
 '__EDITOR__2': u'wysiwyg',
 '__FORM_TOKEN': u'de09a33d54d8a351538c7dd4',
 'action': u'leave',
 'cnum': u'2',
 'comment': u'',
 'field_cc': u'',
 'field_component': u'Projektumgebung (Administration, etc.)',
 'field_description': u'',
 'field_keywords': u'',
 'field_milestone': u'Projektumgebung vollst\xe4ndig aufgesetzt',
 'field_priority': u'major',
 'field_reporter': u'losh',
 'field_summary': u'Trac und svn einrichten',
 'field_type': u'Aufgabe',
 'id': u'2',
 'replyto': u'',
 'submit': u'\xc4nderungen absenden',
 'ts': u'2012-09-16 18:39:36.112138+00:00'}

User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1

System Information

Trac 0.12
Babel 0.9.5
Genshi 0.6
mod_wsgi 2.8 (WSGIProcessGroup WSGIApplicationGroup trac.losh.at|)
pysqlite 2.4.1
Python 2.6.5 (r265:79063, Apr 16 2010, 14:15:55)
[GCC 4.4.3]
pytz 2010b
setuptools 0.6
SQLite 3.6.22
Subversion 1.6.6 (r40053)
jQuery 1.4.2

Enabled Plugins

ComponentDependencyPlugin 0.1
SvnAuthzAdminPlugin 0.2
TicketSidebarProvider 0.0-r11698
TracAccountManager 0.2.1dev
TracGanttCalendarPlugin 0.6.1-r802
TracHoursPlugin 0.6.0dev-r11981
TracWysiwyg 0.2

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/ticket/web_ui.py", line 169, in process_request
    return self._process_ticket_request(req)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/ticket/web_ui.py", line 538, in _process_ticket_request
    self._do_save(req, ticket, action)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/ticket/web_ui.py", line 1233, in _do_save
    cnum=internal_cnum):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/ticket/model.py", line 282, in save_changes
    @self.env.with_transaction(db)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/db/api.py", line 77, in transaction_wrapper
    fn(ldb)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/ticket/model.py", line 329, in do_save
    % name, (self[name], self.id))
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/db/util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/db/sqlite_backend.py", line 78, in execute
    result = PyFormatCursor.execute(self, *args)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/db/sqlite_backend.py", line 56, in execute
    args or [])
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: no such column: estimatedhours

Attachments (0)

Change History (9)

comment:1 Changed 12 years ago by Ryan J Ollos

Thanks for reporting. I'll take a look this evening and get back to you.

comment:2 Changed 12 years ago by Ryan J Ollos

Keywords: needinfo added

I'm not able to reproduce. Could you please provide more details?

It looks like you were adding a comment to the ticket, or, equivalently, changing some fields. Could you describe exactly what you were doing?

Was ticket 2 created before you installed TracHoursPlugin? Do you see an Estimated Hours custom field on the ticket? Are you able to create and update other tickets without any encountering any issues?

comment:3 Changed 12 years ago by Ryan J Ollos

This might be explained by t:#10858. I'll do some testing with changing the custom field.

comment:4 Changed 12 years ago by Ryan J Ollos

I can reproduce by commenting out the estimatedhours entry under ticket-custom. Did you intentionally remove or rename that entry? Could you check the contents of your trac.ini file?

Most recent call last:

File "/home/user/Workspace/th10327/trac-0.12/trac/web/main.py", line 513, in _dispatch_request
  dispatcher.dispatch(req)
File "/home/user/Workspace/th10327/trac-0.12/trac/web/main.py", line 235, in dispatch
  resp = chosen_handler.process_request(req)
File "/home/user/Workspace/th10327/trac-0.12/trac/ticket/web_ui.py", line 169, in process_request
  return self._process_ticket_request(req)
File "/home/user/Workspace/th10327/trac-0.12/trac/ticket/web_ui.py", line 538, in _process_ticket_request
  self._do_save(req, ticket, action)
File "/home/user/Workspace/th10327/trac-0.12/trac/ticket/web_ui.py", line 1233, in _do_save
  cnum=internal_cnum):
File "/home/user/Workspace/th10327/trac-0.12/trac/ticket/model.py", line 282, in save_changes
  @self.env.with_transaction(db)
File "/home/user/Workspace/th10327/trac-0.12/trac/db/api.py", line 77, in transaction_wrapper
  fn(ldb)
File "/home/user/Workspace/th10327/trac-0.12/trac/ticket/model.py", line 329, in do_save
  % name, (self[name], self.id))
File "/home/user/Workspace/th10327/trac-0.12/trac/db/util.py", line 65, in execute
  return self.cursor.execute(sql_escape_percent(sql), args)
File "/home/user/Workspace/th10327/trac-0.12/trac/db/sqlite_backend.py", line 78, in execute
  result = PyFormatCursor.execute(self, *args)
File "/home/user/Workspace/th10327/trac-0.12/trac/db/sqlite_backend.py", line 56, in execute
  args or [])
File "/home/user/Workspace/th10327/trac-0.12/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
  return function(self, *args, **kwargs)

comment:5 Changed 12 years ago by Ryan J Ollos

(In [12027]) Refs #10327: Issue a warning when validating the ticket if 'estimatedhours' is not defined in the ticket-custom section of trac.ini, to avoid a traceback on ticket submit.

comment:6 Changed 12 years ago by Ryan J Ollos

Status: newassigned

comment:7 Changed 12 years ago by Ryan J Ollos

Keywords: needinfo removed

comment:8 Changed 12 years ago by Ryan J Ollos

(In [12029]) Refs #10327:

  • Added unit test infrastructure.
  • Added unit tests for ITicketManipulator implementation in TracHoursPlugin class.
  • Refactored ITicketManipulator methods in TracHoursPlugin class.

comment:9 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Please reopen if you continue to have trouble.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.