Importer needs to give error when cell A is empty too soon

Bug #1035088 reported by Alan Elkner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
Critical
Alan Elkner

Bug Description

Our importers were written many years ago, and at the time, a pattern was developed to use an empty cell in column A as the indicator to stop importing a table of objects. The behaviour is to consider this an end of data condition and not to throw an error even if is there are more non-empty cells that follow it. This might have made sense when the structure of the sheet was a repeating set of header block, table of related data, as is the case for timetables. This, however, is not a good idea for any sheets that are purely a single table of objects. Sheets like years, terms, courses, resources, persons, students and teachers all fit this category, so we should throw an error if we encounter an empty cell A when there are any non-empty cells that follow it.

Alan Elkner (aelkner)
Changed in cando:
assignee: nobody → Alan Elkner (aelkner)
importance: Undecided → Critical
Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Do we even need to consider this an error? Can't we just read all the lines?

Revision history for this message
Alan Elkner (aelkner) wrote :

We will fix this by changing all lines that test for empty cell A with a call to a new method, isEmptyRow. This way, when a user accidentally clears out a cell A, the importer will catch this by throwing a missing cell error.

The change is divided into two categories. Sheets that have multiple blocks will continue to break when an empty row is encountered in order to move onto the next block. Those sheets that are one large table will simply continue reading rows when the empty row is encountered.

Changed in cando:
status: New → Fix Committed
Changed in cando:
milestone: none → 2011.01
affects: cando → schooltool
Changed in schooltool:
milestone: 2011.01 → none
milestone: none → 2.2.1
Changed in schooltool:
status: Fix Committed → Fix Released
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.