Error entering invalid Birthdate

Bug #1003516 reported by Rena Willis
This bug report is a duplicate of:  Bug #960367: ValueError: year=200 is before 1900. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
Triaged
Medium
Douglas Cerna

Bug Description

The following error occurs after a data entry clerk manually entered "0099" for the birthdate year of a student instead of "1999". When trying to bring the student up to correct the mistake... the following error occurs and you can not edit the student details. Clerk is forced to manually type the date as the year drop down does not appear to go back any farther than 2003.

An internal server error has occurred. This most likely means that you have found a bug in SchoolTool. Please report it on the issue tracker.

Exception
ValueError: year=99 is before 1900; the datetime strftime() methods require year >= 1900

 Traceback
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 132, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.6/dist-packages/zope/app/publication/zopepublication.py", line 205, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 107, in mapply
  return debug_call(obj, args)
Extra information: <schooltool.skin.flourish.zcml_content.FlourishPersonEditView_edit.html object at 0xbe96690>
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 113, in debug_call
  return obj(*args)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/page.py", line 77, in __call__
  self.update()
File "/usr/lib/python2.6/dist-packages/schooltool/basicperson/browser/person.py", line 543, in update
  form.EditForm.update(self)
File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 208, in update
  super(Form, self).update()
File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 149, in update
  self.updateWidgets()
File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 134, in updateWidgets
  self.widgets.update()
File "/usr/lib/python2.6/dist-packages/z3c/form/field.py", line 275, in update
  widget.update()
File "/usr/lib/python2.6/dist-packages/z3c/form/browser/text.py", line 35, in update
  super(TextWidget, self).update()
File "/usr/lib/python2.6/dist-packages/z3c/form/browser/widget.py", line 70, in update
  super(HTMLFormElement, self).update()
File "/usr/lib/python2.6/dist-packages/z3c/form/widget.py", line 123, in update
  self.value = converter.toWidgetValue(value)
File "/usr/lib/python2.6/dist-packages/schooltool/skin/widgets.py", line 82, in toWidgetValue
  return value.strftime("%Y-%m-%d")

Revision history for this message
Douglas Cerna (replaceafill) wrote :

Rena, are you using version 2.1? AFAIK, this was already reported/fixed/released here:

https://bugs.launchpad.net/schooltool/+bug/960367

Regarding the year dropdown behaviour in the calendar widget, I admit it's kind of strange. By default you should see the previous 20 years and the next 10 years. If you want to set 1975 for example, you first need to click the dropdown, select 1992 (which makes the dropdown options to dissappear), click the dropdown again and then you have access to 1975.

Revision history for this message
Rena Willis (rwillis) wrote : RE: [Bug 1003516] Re: Error entering invalid Birthdate
Download full text (3.6 KiB)

Gotcha... no problem. We are using 2.0 and will be upgrading to 2.1 in the next week.

Thanks!
Rena

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Douglas Cerna
Sent: Wednesday, May 23, 2012 10:57 AM
To: <email address hidden>
Subject: [Bug 1003516] Re: Error entering invalid Birthdate

Rena, are you using version 2.1? AFAIK, this was already reported/fixed/released here:

https://bugs.launchpad.net/schooltool/+bug/960367

Regarding the year dropdown behaviour in the calendar widget, I admit it's kind of strange. By default you should see the previous 20 years and the next 10 years. If you want to set 1975 for example, you first need to click the dropdown, select 1992 (which makes the dropdown options to dissappear), click the dropdown again and then you have access to 1975.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1003516

Title:
  Error entering invalid Birthdate

Status in SchoolTool:
  New

Bug description:
  The following error occurs after a data entry clerk manually entered
  "0099" for the birthdate year of a student instead of "1999". When
  trying to bring the student up to correct the mistake... the following
  error occurs and you can not edit the student details. Clerk is
  forced to manually type the date as the year drop down does not appear
  to go back any farther than 2003.

  An internal server error has occurred. This most likely means that you
  have found a bug in SchoolTool. Please report it on the issue tracker.

  Exception
  ValueError: year=99 is before 1900; the datetime strftime() methods require year >= 1900

   Traceback
  File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 132, in publish
    result = publication.callObject(request, obj)
  File "/usr/lib/python2.6/dist-packages/zope/app/publication/zopepublication.py", line 205, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 107, in mapply
    return debug_call(obj, args)
  Extra information: <schooltool.skin.flourish.zcml_content.FlourishPersonEditView_edit.html object at 0xbe96690>
  File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 113, in debug_call
    return obj(*args)
  File "/usr/lib/python2.6/dist-packages/schooltool/skin/flourish/page.py", line 77, in __call__
    self.update()
  File "/usr/lib/python2.6/dist-packages/schooltool/basicperson/browser/person.py", line 543, in update
    form.EditForm.update(self)
  File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 208, in update
    super(Form, self).update()
  File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 149, in update
    self.updateWidgets()
  File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 134, in updateWidgets
    self.widgets.update()
  File "/usr/lib/python2.6/dist-packages/z3c/form/field.py", line 275, in update
    widget.update()
  File "/usr/lib/python2.6/dist-packages/z3c/form/browser/text.py", line 35, in update
    super(TextWidget, self).update()
  File "/u...

Read more...

Changed in schooltool:
assignee: nobody → Alan Elkner (aelkner)
importance: Undecided → High
status: New → Triaged
Changed in schooltool:
assignee: Alan Elkner (aelkner) → Douglas Cerna (replaceafill)
importance: High → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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