Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#12115 closed defect (cantfix)

IntegrityError: (1062, "Duplicate entry '4-hours' for key 'PRIMARY'")

Reported by: admin Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

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

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'd3ef9a2d9d2c3f887ae07095',
 'action': u'leave',
 'comment': u'',
 'field_billable': u'1',
 'field_blockedby': u'',
 'field_blocking': u'',
 'field_cc': u'',
 'field_checkbox_billable': u'1',
 'field_checkbox_internal': u'1',
 'field_component': u'WiFi\u8003\u52e4',
 'field_description': u'',
 'field_estimatedhours': u'4',
 'field_hours': u'0',
 'field_keywords': u'',
 'field_milestone': u'WiFi\u8003\u52e4\u7cfb\u7edf\u4f17\u7b79\u7248\u672c',
 'field_parent': u'',
 'field_parents': u'',
 'field_priority': u'normal(\u4e2d\u7b49)',
 'field_reporter': u'admin',
 'field_summary': u'WiFi\u8003\u52e4\u7cfb\u7edfQQ\u767b\u5f55\u548c\u5fae\u535a\u767b\u5f55',
 'field_type': u'task(\u4efb\u52a1)',
 'field_version': u'WiFi\u8003\u52e4',
 'id': u'4',
 'replyto': u'',
 'start_time': u'1436320551366980',
 'submit': u'\u63d0\u4ea4\u53d8\u66f4',
 'view_time': u'1436320551366980'}

User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36

System Information

Trac 1.0.6.post2
Babel 1.3
Docutils 0.12
Genshi 0.7 (with speedups)
GIT 1.7.9.5
mod_wsgi 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
MySQL server: "5.5.35-0ubuntu0.12.04.2", client: "5.5.43", thread-safe: 1
MySQLdb 1.2.5
Pygments 2.0.2
Python 2.7.3 (default, Jun 22 2015, 19:44:33)
[GCC 4.6.3]
pytz 2015.4
setuptools 18.0.1
Subversion 1.6.17 (r1128011)
jQuery 1.7.2
jQuery UI 1.8.21
jQuery Timepicker 1.0.1

Enabled Plugins

EstimationTools 0.4.7.post0
timingandestimationplugin 1.4.6
Trac-jsGantt 0.11.post0
TracAccountManager 0.4.4
Tracchildtickets 2.5.2
TracMasterTickets 4.0.0dev-r0
TracSubTicketsPlugin 0.2.0.dev20150707

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 534, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 227, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/trac/ticket/web_ui.py", line 182, in process_request
    return self._process_ticket_request(req)
  File "build/bdist.linux-x86_64/egg/trac/ticket/web_ui.py", line 619, in _process_ticket_request
    self._do_save(req, ticket, action)
  File "build/bdist.linux-x86_64/egg/trac/ticket/web_ui.py", line 1350, in _do_save
    replyto=req.args.get('replyto'))
  File "build/bdist.linux-x86_64/egg/trac/ticket/model.py", line 369, in save_changes
    listener.ticket_changed(self, comment, author, old_values)
  File "build/bdist.linux-x86_64/egg/timingandestimationplugin/ticket_daemon.py", line 117, in ticket_changed
    self.watch_hours(ticket)
  File "build/bdist.linux-x86_64/egg/timingandestimationplugin/ticket_daemon.py", line 98, in watch_hours
    @self.env.with_transaction()
  File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 99, in transaction_wrapper
    fn(ldb)
  File "build/bdist.linux-x86_64/egg/timingandestimationplugin/ticket_daemon.py", line 101, in fn
    save_custom_field_value( db, ticket_id, "hours", '0')
  File "build/bdist.linux-x86_64/egg/timingandestimationplugin/ticket_daemon.py", line 34, in save_custom_field_value
    "value) VALUES(%s,%s,%s)", (ticket_id, field, value))
  File "build/bdist.linux-x86_64/egg/trac/db/util.py", line 72, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry '4-hours' for key 'PRIMARY'")

Attachments (0)

Change History (1)

comment:1 by Jun Omae, 7 years ago

Resolution: cantfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.