Opened 11 years ago
Closed 11 years ago
#519 closed defect (fixed)
Date fields should not allow 6-digit dates
Reported by: | Nicklas Nordborg | Owned by: | olle |
---|---|---|---|
Priority: | trivial | Milestone: | Reggie v2.13 |
Component: | net.sf.basedb.reggie | Keywords: | |
Cc: |
Description
In all wizards that include date fields, the instructions are that dates can be entered in YYYYMMDD
or MMDD
format. In the latter case the current year is automatically added to the final date.
However, the implementation that add the year also allow dates in YYMMDD
format and add either 19 or 20 so that the date is always within that last 100 years.
Since the latter behavior has caused incorrect dates to be entered in at least one case. Eg. 201212
was converted to 19201212
when the real date was 20121212
.
Suggested fix is to remove support for 6-digit dates in all places. The actual implementation may still allow it but this could for example be controlled by adding a second (boolean) parameter to the autoFillDate()
function in reggie.js
Change History (7)
comment:1 by , 11 years ago
Owner: | changed from | to
---|
comment:2 by , 11 years ago
Status: | new → assigned |
---|
comment:3 by , 11 years ago
(In [2084]) Refs #519. Reggie updated to not auto-fill 6-digit date entries by default:
- JavaScript
reggie.js
inreggie/resources/
updated in functionautoFillDate(shortDate)
to accept a second argumentallowSixDigitDates
, which by default is set tofalse
. Six-digit dates are now auto-filled only if argumentallowSixDigitDates
has valuetrue
.
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ticket closed as the fix suggested in the ticket description has been implemented.
comment:5 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Reopening this ticket. The two blood registration wizards should allow 6-digit dates to be used. The reason is that those referral forms are often registered much later than when the blood sample was taken, so that the auto-completion from 4-digit values may not be able to guess the correct year.
comment:6 by , 11 years ago
(In [2139]) Refs #519. Refs #449. The two blood registration wizards updated to allow 6-digit dates to be used:
- JSP script
bloodform.jsp
inreggie/resources/personal/
updated in functionssamplingDateTimeOnChange()
andfreezerDateTimeOnChange()
to call functionautoFillDate(shortDate, allowSixDigitDates)
inreggie.js
inreggie/resources/
with argumentallowSixDigitDates
set totrue
. - JSP script
bloodfollowupform.jsp
inreggie/resources/personal/
updated in functionssamplingDateTimeOnChange()
andfreezerDateTimeOnChange()
to call functionautoFillDate(shortDate, allowSixDigitDates)
inreggie.js
inreggie/resources/
with argumentallowSixDigitDates
set totrue
.
comment:7 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ticket closed again after updating the two blood registration wizards to allow 6-digit dates.
Ticket accepted.