Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#12883 closed defect (cantfix)

DataError: integer out of range

Reported by: carlosadean@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.12.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

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

After set the this format of date "07/31/17 00:00:00" in the field "Due" trac shows this error and does not register the milestone. How can I fix it ?

Thanks!

Request parameters:

{'__FORM_TOKEN': u'cc21c2d7e26d9060c1d49020',
 'add': u'Add',
 'cat_id': u'ticket',
 'duedate': u'07/31/17 00:00:00',
 'name': u'Sprint-09',
 'panel_id': u'milestones',
 'path_info': None}

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

System Information

Trac 0.12.1
Babel 0.9.4 (translations unavailable)
Genshi 0.6
mod_python 3.3.1
psycopg2 2.0.14
Pygments 1.1.1
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
pytz 2010h
setuptools 0.6
Subversion 1.6.11 (r934486)
jQuery 1.4.2

Enabled Plugins

timingandestimationplugin 1.3.7
Trac-jsGantt 0.9-r11182
TracSubcomponents 1.1.2

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 514, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 240, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.6/site-packages/trac/admin/web_ui.py", line 116, in process_request
    path_info)
  File "/usr/lib/python2.6/site-packages/trac/ticket/admin.py", line 53, in render_admin_panel
    return self._render_admin_panel(req, cat, page, version)
  File "/usr/lib/python2.6/site-packages/trac/ticket/admin.py", line 298, in _render_admin_panel
    mil.insert()
  File "/usr/lib/python2.6/site-packages/trac/ticket/model.py", line 984, in insert
    @self.env.with_transaction(db)
  File "/usr/lib/python2.6/site-packages/trac/db/api.py", line 77, in transaction_wrapper
    fn(ldb)
  File "/usr/lib/python2.6/site-packages/trac/ticket/model.py", line 992, in do_insert
    to_utimestamp(self.completed), self.description))
  File "/usr/lib/python2.6/site-packages/trac/db/util.py", line 54, in execute
    r = self.cursor.execute(sql_escape_percent(sql), args)
DataError: integer out of range

Attachments (0)

Change History (9)

comment:1 by Jun Omae, 7 years ago

Keywords: needinfo added

Please make sure that type of milestone.due is bigint. Similar issue is #9535.

trac-# \d milestone
     Table "public.milestone"
   Column    |  Type  | Modifiers
-------------+--------+-----------
 name        | text   | not null
 due         | bigint |
 completed   | bigint |
 description | text   |
Indexes:
    "milestone_pkey" PRIMARY KEY, btree (name)

comment:2 by anonymous, 7 years ago

Unfortunately I do not know the cause of the error nor if other errors will appear after I change the column to bigint, maybe a plugin is the source. Anyway, it's working now.

Thank you!

trac_linea=# \d trac.milestone
      Table "trac.milestone"
   Column    |  Type   | Modifiers 
-------------+---------+-----------
 name        | text    | not null
 due         | integer | 
 completed   | integer | 
 description | text    | 
 started     | integer | 
Indexes:
    "milestone_pkey" PRIMARY KEY, btree (name)

trac_linea=# ALTER TABLE trac.milestone ALTER COLUMN due TYPE bigint;
ALTER TABLE

trac_linea=# \d trac.milestone
      Table "trac.milestone"
   Column    |  Type   | Modifiers 
-------------+---------+-----------
 name        | text    | not null
 due         | bigint  | 
 completed   | integer | 
 description | text    | 
 started     | integer | 
Indexes:
    "milestone_pkey" PRIMARY KEY, btree (name)

comment:3 by anonymous, 7 years ago

Resolution: fixed
Status: newclosed

comment:5 by anonymous, 7 years ago

Resolution: fixed
Status: closedreopened

comment:6 by Jun Omae, 7 years ago

Keywords: needinfo removed
Resolution: cantfix
Status: reopenedclosed

PluginIssue. Also, your milestone.completed has the same issue.

comment:7 by Jun Omae, 7 years ago

At least, that plugin shouldn't modify tables which are created by Trac core.

in reply to:  6 comment:8 by anonymous, 7 years ago

Replying to Jun Omae:

PluginIssue. Also, your milestone.completed has the same issue.

Certainly one of these:

GoogleCalendar 0.1.2
timingandestimationplugin 1.3.7
Trac-jsGantt 0.9-r11182
TracSubcomponents 1.1.2

What about the column milestone.started, shouldn't be its datatype bigin?

comment:9 by Ryan J Ollos, 7 years ago

Created th:#13257 to deal with issue for th:ScrumBurndownPlugin.

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.