Edgewall Software

Ticket #4466 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Can't mark milestone as completed (TypeError: can't compare datetime.datetime to float)

Reported by: akaihola Owned by: cboos
Priority: high Milestone: 0.11
Component: general Version: devel
Severity: major Keywords:
Cc:

Description

How to Reproduce

On the Manage Milestones page, if I check the "Completed" checkbox, accept the current date and time as automatically filled in, and click "Save", Trac issues an internal error. My trac is revision [4501] from svn.

{'__FORM_TOKEN': u'002c6d797a0a5b2da4663143',
 'cat_id': u'ticket',
 'completed': u'on',
 'completeddate': u'28.12.2006 00:37:14',
 'description': u'My milestone description',
 'duedate': u'28.12.2006',
 'name': u'My milestone name',
 'panel_id': u'milestones',
 'path_info': u'My milestone path info',
 'save': u'Save'}

System Information

Trac 0.11dev
Python 2.4 (#2, Feb 12 2005, 00:29:46)
[GCC 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)]
SQLite 3.2.2
pysqlite 2.0.4
Genshi 0.4dev-r466
Subversion 1.1.4

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 395, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 213, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/admin/web_ui.py", line 84, in process_request
    path_info)
  File "/usr/lib/python2.4/site-packages/trac/ticket/admin.py", line 132, in render_admin_panel
    if mil.completed > time.time():
TypeError: can't compare datetime.datetime to float

Attachments

Change History

Changed 2 years ago by athomas

  • status changed from new to closed
  • resolution set to fixed

Fixed in r4502.

Changed 2 years ago by kkatzke@…

  • status changed from closed to reopened
  • resolution fixed deleted

This issue is still present in r4634.

How to Reproduce

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

{'panel_id': u'milestones', 'description': u, 'completed': u'on', 'FORM_TOKEN': u'60d637ed9e7ebd728fe8f5ff', 'path_info': u'Camps - Admin 1', 'cat_id': u'ticket', 'save': u'Save', 'duedate': u'02/05/07', 'name': u'Camps - Admin Campers'}

System Information

Trac 0.11dev
Python 2.3.4 (#1, Jan 12 2005, 09:22:26)

[GCC 3.4.3 20041114 (Red Hat 3.4.3-4)]

SQLite 3.3.3
pysqlite 1.1.7
Genshi 0.3.6
Subversion 1.1.4

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 395, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 213, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/trac/admin/web_ui.py", line 96, in process_request
    path_info)
  File "/usr/lib/python2.3/site-packages/trac/ticket/admin.py", line 133, in render_admin_panel
    if mil.completed > datetime.now(utc):
TypeError: can't compare datetime.datetime to int

Changed 2 years ago by kkatzke@…

  • priority changed from normal to high
  • severity changed from normal to major

Gents: This is a horrible bug in 0.11, as the "Complete Milestone" checkbox is checked by default when editing a milestone. Could someone either patch this, or at least fix it by removing the default 'on' in the Complete Milestone checkbox?

Upping priority to get it some attention, knock it down if you feel the need.

Changed 2 years ago by cboos

  • owner changed from jonas to cboos
  • status changed from reopened to new
  • milestone set to 0.11

Ok, bug reproduced.

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Should be fixed by r4661.

Add/Change #4466 (Can't mark milestone as completed (TypeError: can't compare datetime.datetime to float))

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.