Lesson Learned

Today was going to be a semi-relaxing afternoon after a routine dentist visit.

Ha.

The minor, low-key release (yes, those are the danger words right there) proved to have problems that led to me firing up the work laptop as soon as I got home from the dentist so I could test the fix to the problems we’d managed to accidentally introduce.

Leading to a big lesson learned: never assume that adding a default means you don’t need to check what happens when you bloody save. Turned out the default was over-enthusiastic, and overwrote anything that already lived in that field on load. Data saved as you entered it, but you’d reload the page and get the default coming back at you. That was bug one.

Bug two was nastier, caused by the same default. Sort of. There’s a rare situation where in add mode, instead of moving to the next part of the wizard or reloading the original with an error message about whatever triggered that particular validation, there’s a mostly blank screen displayed with a bold text message that this one field which should not (according to our system rules) have a duplicate record actually does have a duplicate (which, for business reasons is actually a legitimate thing, but rare-ish) and do you really want that to happen?

Of course, this happens rarely enough that nobody thought to check on it, and of course the over-enthusiastic default check didn’t take this particular rare situation into account.

And of course, Murphy being the bastard he is and Murphy’s Law being the only certain thing in the universe besides death and taxes, several cases of it hit today. Complete with nasty error.

So the fix is coded, tested, and will be deployed tomorrow morning where we can monitor what happens and fix anything else that might happen. And the thoughtful post I was going to write about forgiveness and other things is now not even a memory.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *