thewca / wca-workbook-assistant

Java application for processing Excel workbooks with WCA competition results for uploading them to the WCA database
7 stars 4 forks source link

Dangerous bug related to DOB #111

Open Luis-J-Ianez opened 8 years ago

Luis-J-Ianez commented 8 years ago

For River Hill Fall 2015, I personally created the results JSON file from the XLSX. The XLSX neatly states 0000-00-00 as a DOB for a competitor, the WCA Workbook Assistant imports that cell correctly, but the JSON was produced with the DOB = "0002-11-30". Funnily enough, after searching for "0002-11-30" in the internet, seems that it's a common error. I'm in a hurry now, so I'm just dropping this bug report here for us to not forget.

jfly commented 8 years ago

Wow! That's a funny one. What should the JSON contain for unknown DOBs? We should document that on https://github.com/cubing/worldcubeassociation.org/wiki/WCA-Competition-JSON-Format. "000-00-00" is not a valid ISO 8601 Date as the documentation requires. Maybe NULL would be cleaner?

Luis-J-Ianez commented 8 years ago

The case is that what is failing doesn't fail always. Otherwise the database would be plenty of "0002-11-30".

jfly commented 8 years ago

Ohh, interesting! I wonder if it's related to the version of Java people are using, or perhaps their computer's locale settings?

rwcinoto commented 8 years ago

So we should fix such cases manually, and should we put 0 for the three columns there? Year, month and day?

jfly commented 8 years ago

@rwcinoto that sounds correct, yes.

SAuroux commented 5 years ago

This still happens every now any then and always requires WRT to manually change such DOBs. Would it be possible to fix this in a quick and dirty way by replacing "0002-11-30" by "0000-00-00" in the export procedure? If yes, it would be cool if this could be done for the upcoming release.