Modify

Opened 5 years ago

Closed 5 years ago

#4457 closed defect (fixed)

Unable to use an empty separator

Reported by: cheungpat Owned by: coderanger
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I defined this in conf/trac.ini,

[datefield]
format = ymd
separator = 

expecting to use the format YYYYMMDD. When I input such date into the form, the Trac gives me a validation failure. The following message appears in the log file,

Trac[filter] DEBUG: DateFieldModule: Got an exception, assuming it is a validation failure.
Traceback (most recent call last):
   File "build/bdist.linux-i686/egg/datefield/filter.py", line 72, in validate_ticket
     if len(val.split(self.date_sep)) != 3:
ValueError: empty separator

Looking at the code, it seems the validation code always expect a separator.

This probably isn't a serious issue... people can certainly use YYYY-MM-DD instead.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by doki_pen

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

(In [6154]) fixed #4457

Add Comment

Modify Ticket

Action
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'.
Author


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

 
Note: See TracTickets for help on using tickets.