Opened 3 years ago

Last modified 3 months ago

#11459 new task

OperationalError: (1054, "Unknown column 'hours' in 'field list'")

Reported by: admin Owned by:
Priority: high Component: WorkLogPlugin
Severity: normal Keywords:
Cc: bhairav@… Trac Release: 1.0


How to Reproduce

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

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'c28fc3ec7a28b6b4baf3f85d',
 'comment': u'Test ',
 'source_url': u'/trac/ticket/68',
 'stoptime': u'',
 'stopwork': u'Stop Work',
 'ticket': u'68'}

User agent: Mozilla/5.0 (Windows NT 5.1; rv:26.0) Gecko/20100101 Firefox/26.0

System Information

Trac 1.0.1
Agilo 0.9.12
Genshi 0.7 (with speedups)
MySQL server: "5.5.34-0ubuntu0.12.04.1", client: "5.5.34", thread-safe: 1
MySQLdb 1.2.4
Pygments 1.4
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3]
pytz 2011k
setuptools 2.0.1
jQuery 1.7.2

Enabled Plugins

agilo 0.9.12
AutocompleteUsers 0.4.2dev-r12687
ComponentDependencyPlugin 0.1
timingandestimationplugin 1.3.7
TracAccountManager 0.4.3
TracAutoComplete 0.1
TracTicketChangesets 1.0dev-r10004
worklog 0.3dev-r12358

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/", line 497, in _dispatch_request
  File "build/bdist.linux-x86_64/egg/trac/web/", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/worklog/", line 143, in process_request
    if not mgr.stop_work(stoptime, comment):
  File "build/bdist.linux-x86_64/egg/worklog/", line 224, in stop_work
    self.save_ticket(tckt, message)
  File "build/bdist.linux-x86_64/egg/worklog/", line 81, in save_ticket
    tckt.save_changes(self.authname, msg, nowdt, cnum=str(cnum+1))
  File "/usr/local/lib/python2.7/dist-packages/agilo-0.9.12-py2.7.egg/agilo/ticket/", line 860, in save_changes
    res = super(AgiloTicket, self).save_changes(author, comment, when, db, cnum, replyto=replyto)
  File "build/bdist.linux-x86_64/egg/trac/ticket/", line 346, in save_changes
    % name, (self[name],
  File "build/bdist.linux-x86_64/egg/trac/db/", line 121, in execute
    cursor.execute(query, params)
  File "build/bdist.linux-x86_64/egg/trac/db/", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.4-py2.7-linux-x86_64.egg/MySQLdb/", line 201, in execute
    self.errorhandler(self, exc, value)
  File "/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.4-py2.7-linux-x86_64.egg/MySQLdb/", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1054, "Unknown column 'hours' in 'field list'")

Attachments (0)

Change History (8)

comment:1 Changed 3 years ago by Ryan J Ollos

Component: SELECT A HACKWorkLogPlugin
Owner: changed from anonymous to Colin Guthrie

comment:2 Changed 3 years ago by bhairav@…


We have configured timingandestimationplugin with worklog plugin all things are working proper. But when i click on stop work. I will shows this wornning error.

Note : After press F5 button it's shows normal again.

Thanks, Bhairav S. Dhanwade

comment:3 Changed 3 years ago by Ryan J Ollos

What is in your [ticket-custom] section of trac.ini?

comment:4 Changed 3 years ago by anonymous

Hello rjollos,

Please find [ticket-custom] section content below.

ba = select
ba.label = Business Analyst
ba.options = vipra|ankit|sameer|vishal|ankit|kunal|nandita
ba.order = 12
ba.value = vipra
billable = checkbox
billable.label = Billable?
billable.order = 3
billable.value = 1
businessvalue = select
businessvalue.label = Business Value
businessvalue.options = |100|200|300|500|800|1200|2000|3000
businessvalue.value =
drp_resources = text
drp_resources.label = Resources
estimatedhours = text
estimatedhours.label = Estimated Hours
estimatedhours.value = 0
hours = text
hours.label = Add Hours to Ticket
hours.order = 2
hours.value = 0
i_links = text
i_links.label = Referenced By
internal = checkbox
internal.label = Internal?
internal.order = 5
internal.value = 0
o_links = text
o_links.label = References
rd_points = select
rd_points.label = Story Points
rd_points.options = |0|1|2|3|5|8|13|20|40|100
remaining_time = text
remaining_time.label = Remaining Time
sprint = select
sprint.label = Sprint
sprint.value =
story_priority = select
story_priority.label = Importance
story_priority.options = |Mandatory|Linear|Exciter
story_priority.value =
totalhours = text
totalhours.label = Total Hours
totalhours.value = 0
Last edited 3 years ago by Ryan J Ollos (previous) (diff)

comment:5 Changed 3 years ago by Ryan J Ollos

I've tried to reproduce with your configuration: MySQL + Agilo, but no luck so far. There are similar error messages for Agilo reported in trac:#11253 and on the mailing list.

Do you still see the error after disabling Agilo? Can you repeat the error with any ticket in your system?

comment:6 Changed 3 years ago by Ryan J Ollos

In 13530:

0.4dev: cnum paramter of Ticket.save_changes is deprecated since Trac 1.0. Refs #11459.

comment:7 Changed 3 years ago by Ryan J Ollos

Trac Release: 1.0

comment:8 Changed 3 months ago by Ryan J Ollos

Owner: Colin Guthrie deleted

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

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

Note: See TracTickets for help on using tickets.