Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#4466 closed defect (fixed)

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

Reported by: akaihola Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: general Version: devel
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

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 (0)

Change History (5)

comment:1 by Alec Thomas, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in r4502.

comment:2 by kkatzke@…, 17 years ago

Resolution: fixed
Status: closedreopened

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
[GCC 3.4.3 20041114 (Red Hat 3.4.3-4)]
Python 2.3.4 (#1, Jan 12 2005, 09:22:26)
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

comment:3 by kkatzke@…, 17 years ago

Priority: normalhigh
Severity: normalmajor

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.

comment:4 by Christian Boos, 17 years ago

Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos
Status: reopenednew

Ok, bug reproduced.

comment:5 by Christian Boos, 17 years ago

Resolution: fixed
Status: newclosed

Should be fixed by r4661.

Modify Ticket

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