Invalid date in Date/Time custom field does not cause an error

UNCONFIRMED
Unassigned

Status

()

Bugzilla
Creating/Changing Bugs
--
minor
UNCONFIRMED
5 years ago
3 years ago

People

(Reporter: mrbball, Unassigned)

Tracking

Details

(Reporter)

Description

5 years ago
If I enter an invalid date into a Date/Time custom field in the web UI, Bugzilla
does not complain but the UI automatically resets the value to something else.  For
example, if the date "2012-13-32" is entered, the value is automatically reset to
"2013-02-01".  I would expect an error message in this case.

If I try to set the same invalid date using the email interface, I get the following
error back:

  '2012-13-32' is not a legal date. Please use the format 'YYYY-MM-DD'.

This is what I would expect in the web UI as well.

Comment 1

5 years ago
This is a known behavior. I cannot remember in which bug we talked about this. Maybe it was marked WONTFIX.
Assignee: ui → query-and-buglist
Component: User Interface → Query/Bug List
OS: Linux → All
Hardware: x86_64 → All
Whiteboard: DUPEME
(Reporter)

Comment 2

5 years ago
It doesn't really matter to  me, but I don't understand why this is Query/Bug List bug.
I saw the error during bug update/creation and it appears to be the UI (JavaScript) that
is resetting the field.

Also, I could not find any bugs along these lines, including searching the terms "bad
date", "invalid date", and "date/time" in the subject or comments. I'd be curious to
read the details about why it works the way it does.

I'm not sure, but it looks like the code to reset the date was added by bug 397099.
I don't see any discussion of this particular problem there, though.

Updated

3 years ago
Assignee: query-and-buglist → create-and-change
Component: Query/Bug List → Creating/Changing Bugs
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.