Opened 11 years ago

Closed 11 years ago

#1387 closed defect (fixed)

Cannot blank the date field

Reported by: cbillen@… Owned by: Noah Kantrowitz
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


Just installed datefield in trac 0.10 and set the configuration to allow for blank values

However, whenever I blank out a date field which previously had a value I get this lovely error:

Python Traceback

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/trac/web/", line 387, in dispatch_request


File "/usr/lib/python2.4/site-packages/trac/web/", line 238, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.4/site-packages/trac/ticket/", line 279, in process_request

self._do_save(req, db, ticket)

File "/usr/lib/python2.4/site-packages/trac/ticket/", line 536, in _do_save

self._validate_ticket(req, ticket)

File "/usr/lib/python2.4/site-packages/trac/ticket/", line 66, in _validate_ticket

for field, message in manipulator.validate_ticket(req, ticket):

File "build/bdist.linux-i686/egg/datefield/", line 77, in validate_ticket

NameError: global name 'traceback' is not defined

Attachments (0)

Change History (5)

comment:1 Changed 11 years ago by flatter@…

Same here.

comment:2 Changed 11 years ago by Keith Watson

Yes I get the same and also when I enter an invalid date.

comment:3 Changed 11 years ago by Keith Watson

No strike that, once I configure the field to allow blanks it works [blush].

But anything that causes a validation error gives the above error.

comment:4 Changed 11 years ago by Keith Watson

Problem seems to be the the latest change to source:datefieldplugin/0.10/datefield/ at line 77

                self.log.debug('DateFieldModule: Got an exception, assuming it is a validation failure.\n'+traceback.format_exc())

If you comment this out validation works fine.

comment:5 Changed 11 years ago by Noah Kantrowitz

Resolution: fixed
Status: newclosed

(In [2172]) Add missing import. (closes #1387)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.