Wednesday, June 29, 2005

IERI Utility

KM was having a problem with some of the timecoding she had done disappearing. Luckily there was no need to panic about data loss this time. After our last major data loss I started a daily backup that maintains three months worth of database copies.

The source of the data loss was my own carelessness. When I implemented the sighting-level timecode inside the sightings summary table I copied a lot of the code from the acitivity-level process. In the activity-level process the code checks the timecoding against all activities in the sequence. If an activity does not have a numeric timecode then it is reset to null. The modified code for the sightings did the same. The problem is that when you're working on a particular activity, the sightings for the other activities are not represented. Since no timecoding was passed to the script for those other sightings it assumed they were supposed to be set to null. This is obviously not correct. I addressed the problem by limiting which sightings were reviewed to those in the current activity.