OOPS registering sprint or meeting using date format DD-M-YYYY

Bug #134063 reported by Diogo Matsubara
14
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
j.c.sackett

Bug Description

Steps to reproduce (using sample data):
1. Open http://launchpad.dev/sprints/+new
2. Fill in all required fields;
3. Fill in "Starting date and time": 15-5-2008
4. Fill in "Finishing date and time": 16-5-2008
5. OOPS-598S557 IntegrityError ERROR: new row for relation "sprint" violates check constraint "sprint_starts_before_ends"

Recently: OOPS-980S229, OOPS-980S233, OOPS-980S236

Related branches

Changed in blueprint:
status: New → Confirmed
Changed in blueprint:
assignee: nobody → jsk
Revision history for this message
Diogo Matsubara (matsubara) wrote :

I seem to be wrong in my assumption that the cause of the bug is the date format: DD-M-YYYY
This bug can also be reproduced using the same date and time for both steps 3 and 4 in the following format YYYY-MM-DD HH:MM:SS
A similar oops (OOPS-600A1612) can be seen in the sprint attendence form (i.e. $sprint/+attend). I suspect that the problem lies in the LocalDateTimeWidget.

Changed in blueprint:
status: Confirmed → Incomplete
Revision history for this message
Jonathan Knowles (jsk) wrote :

I have confirmed this OOPS when using the DD-M-YYYY
So far I've been unable to confirm that the bug occurs when using the YYYY-MM-DD HH:MM:SS format.

Changed in blueprint:
status: Incomplete → Confirmed
importance: Undecided → High
Jonathan Knowles (jsk)
Changed in blueprint:
status: Confirmed → In Progress
Revision history for this message
Jonathan Knowles (jsk) wrote :

This is caused indirectly by bug 139360 in Zope 3.2.

Revision history for this message
Jonathan Knowles (jsk) wrote :

Bug 139360 in Zope's DateTimeParser causes certain dates to be parsed incorrectly. In the example given above, both dates are parsed incorrectly to the same date: 1st January 2008. Since meetings must finish after they start (in our database), the above integrity error is triggered.

Revision history for this message
Jonathan Knowles (jsk) wrote :

Shifting to 1.1.10 as the fix is non-trivial. We need to apply a temporary workaround for bug 139360.

Revision history for this message
Jonathan Knowles (jsk) wrote :

Also raised a further related bug 139413 (LocalDateTimeWidget doesn't support little-endian dates).

Jonathan Knowles (jsk)
Changed in blueprint:
assignee: jsk → nobody
Revision history for this message
Jonathan Knowles (jsk) wrote :

Resetting to confirmed after discussion at Malone Sprint.

Changed in blueprint:
status: In Progress → Confirmed
Revision history for this message
Jonathan Knowles (jsk) wrote :

Resetting to confirmed after discussion with BjornT.

Changed in launchpad:
status: New → Confirmed
importance: Undecided → High
Joey Stanford (joey)
Changed in blueprint:
milestone: 1.1.10 → none
Ursula Junque (ursinha)
description: updated
Curtis Hovey (sinzui)
Changed in blueprint:
importance: High → Low
Changed in launchpad-foundations:
importance: High → Low
Revision history for this message
Curtis Hovey (sinzui) wrote :

We have a new datetime widget that handle user mistakes better.

Changed in launchpad-foundations:
status: Triaged → Fix Released
Curtis Hovey (sinzui)
tags: added: sprints
Changed in launchpad:
importance: Low → Critical
j.c.sackett (jcsackett)
Changed in launchpad:
assignee: nobody → j.c.sackett (jcsackett)
Revision history for this message
j.c.sackett (jcsackett) wrote :

The largest problem here isn't in the field; by the time data makes it to the field, it's already been formatted. The problem is that zope.datetime.parse can only deal with "%Y-%m-%d" and "%m-%d-%Y" dates. Further, it requires dates to be double-digit, so that '5' there throws it completely for a loop and it comes up with 2008-1-1 for both.

When *that* happens, the code for validating the data in the view correctly determines that the start_date isn't later than the end_date (they're the same) but our database sees start as greater.

j.c.sackett (jcsackett)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.03
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
j.c.sackett (jcsackett)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.