Opened 7 years ago

Closed 7 years ago

#1387 closed defect (fixed)

Cannot blank the date field

Reported by: cbillen@… Owned by: coderanger
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 7 years ago by flatter@…

Same here.

comment:2 Changed 7 years ago by Keith

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

comment:3 Changed 7 years ago by Keith

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 7 years ago by Keith

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 7 years ago by coderanger

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.