Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0005273
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] B. User interfaceminorhave not tried2008-09-25 16:572009-02-18 11:04
ReporterplujanView Statuspublic 
Assigned Todbaz 
PrioritynormalResolutionfixedFixed in Versionpi
StatusclosedFix in branchpiFixed in SCM revision12987
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.40SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0005273: When entering dates with dd-mm-yy format are saved as dd-mm-00yy

DescriptionOn PostgreSQL, if I enter a date in a two year format, by example 21-09-08, it is saved on database as 21-09-0008.
Steps To Reproduce1. Go Sales Order and create a new one.
2. On Order Date field enter 21-09-08
3. Note that no AJAX warning is shown.
4. Save
5. The Order is saved, but date changed to 21-09-0008
Proposed Solution*2-digit year dates should be managed using a 100 year range. By example, dates between 1920 and 2019 are interpreted correctly when written in 2-digit format

*Display a proper warning message like "This date is probably wrong" for strange dates like year before 1900 or dates 50 years away from current year, so the user could continue at his/her own risk.

*Do not allow user to enter less than 4 digit on years
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0005290 closeddbaz When entering dates with dd-mm-yy format are saved as dd-mm-00yy 
related to defect 0008417 closeddbaz Auto fill functionality for date fields (for years) not working in Reports (Warehouse management) 

-  Notes
(0011063)
dbaz (developer)
2008-12-09 12:58

The right solution would be that when a user enter a 2 year-digit date, the date automatically becomes completed using Javascript.

For example, when a user types 02-02-82 the date automatically should become changed to 02-02-1982 just before do the validation that is going to show an error message (if there would be).

The date range to do the auto-completion should be 1920-2019
(0013283)
dbaz (developer)
2009-02-10 02:38
edited on: 2009-02-10 02:38

Finally the solution is that if a YYYY (for the year representation) is set in Openbravo.properties, any two digit input will be rounded as:

00 -> 49 .......... 2000 -> 2049
50 -> 99 .......... 1950 -> 1999

If anyone should have another range proposal, just tell me.

The proposed range is set in the variable

centuryReference

of the function

expandDateYear

of the file

web/js/default/DateTextBox.js

(0013284)
svnbot (reporter)
2009-02-10 02:40

Repository: openbravo
Revision: 12987
Author: dbaz
Date: 2009-02-10 02:40:40 +0100 (Tue, 10 Feb 2009)

Fixed bug 5273: Now two yeard digit inputs are completed when YYYY format is set (just in WAD windows)

---
U trunk/src-wad/src/org/openbravo/wad/controls/WADDate.html
U trunk/web/js/default/DateTextBox.js
---

https://dev.openbravo.com/websvn/openbravo/?rev=12987&sc=1 [^]
(0013631)
sureshbabu (reporter)
2009-02-18 11:04

Working fine retested in context 79.125.56.185/openbravotrunk

- Issue History
Date Modified Username Field Change
2008-09-25 16:57 plujan New Issue
2008-09-25 16:57 plujan Assigned To => cromero
2008-09-25 16:57 plujan sf_bug_id 0 => 2128584
2008-09-25 16:57 plujan Regression testing => No
2008-09-29 09:57 psarobe Status new => scheduled
2008-09-29 09:57 psarobe Assigned To cromero => dbaz
2008-09-29 09:57 psarobe fix_in_branch => trunk
2008-12-09 12:58 dbaz Note Added: 0011063
2009-02-10 02:38 dbaz Note Added: 0013283
2009-02-10 02:38 dbaz Note Edited: 0013283
2009-02-10 02:40 svnbot Checkin
2009-02-10 02:40 svnbot Note Added: 0013284
2009-02-10 02:40 svnbot Status scheduled => resolved
2009-02-10 02:40 svnbot Resolution open => fixed
2009-02-10 02:40 svnbot svn_revision => 12987
2009-02-18 11:04 sureshbabu Status resolved => closed
2009-02-18 11:04 sureshbabu Note Added: 0013631
2009-02-18 11:04 sureshbabu Fixed in Version => trunk
2009-04-20 10:06 dbaz Relationship added related to 0008417


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker