Modify

Opened 9 months ago

Last modified 9 months ago

#11459 new task

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

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

Description

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)
GIT 1.7.9.5
GIT 1.7.9.5
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
TracGit 0.12.0.5dev
TracTicketChangesets 1.0dev-r10004
worklog 0.3dev-r12358

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/worklog/webui.py", line 143, in process_request
    if not mgr.stop_work(stoptime, comment):
  File "build/bdist.linux-x86_64/egg/worklog/manager.py", line 224, in stop_work
    self.save_ticket(tckt, message)
  File "build/bdist.linux-x86_64/egg/worklog/manager.py", 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/model.py", 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/model.py", line 346, in save_changes
    % name, (self[name], self.id))
  File "build/bdist.linux-x86_64/egg/trac/db/util.py", line 121, in execute
    cursor.execute(query, params)
  File "build/bdist.linux-x86_64/egg/trac/db/util.py", 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/cursors.py", 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/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1054, "Unknown column 'hours' in 'field list'")

Attachments (0)

Change History (7)

comment:1 Changed 9 months ago by rjollos

  • Component changed from SELECT A HACK to WorkLogPlugin
  • Owner set to coling

comment:2 Changed 9 months ago by bhairav@…

Hello,

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 9 months ago by rjollos

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

comment:4 Changed 9 months ago by anonymous

Hello rjollos,

Please find [ticket-custom] section content below.

[ticket-custom]
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 9 months ago by rjollos (previous) (diff)

comment:5 Changed 9 months ago by rjollos

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 9 months ago by rjollos

In 13530:

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

comment:7 Changed 9 months ago by rjollos

  • Trac Release set to 1.0

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.