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

If all the cells are filled in on a combined round, complain! fixes #40. #85

Closed jfly closed 10 years ago

jfly commented 10 years ago

I noticed that combined rounds don't check which solves were entered, all they require is that the very first time be entered. Here's the relevant code from WorkbookValidator:

Long result;
if (round.isCombined() && resultIdx > 1) {
    result = CellParser.parseOptionalSingleTime(resultCell, resultFormat, event, aFormulaEvaluator);
}
else {
    result = CellParser.parseMandatorySingleTime(resultCell, resultFormat, event, aFormulaEvaluator);
}
results[resultIdx - 1] = result;

Ideally, we'd assert that all the incomplete rows have the same number of solves entered, and that there aren't any gaps in that range.

jazzthief81 commented 10 years ago

I've tested this on a bunch of workbooks and it works great. @jfly You can make an issue for the enhancement you suggested. This is something we can tackle in a later patch release.

jfly commented 10 years ago

Ok, I've created #86 for this.