DEV Community

Sheaf
Sheaf

Posted on

My import worked on clean data. Messy data broke it six ways.

The first version of our Harvest import worked great.

On my test account. Which had three clients, two projects, and nothing weird in it at all.

Some context. I'm building Sheaf, a time tracking and invoicing app for small agencies. A lot of the people trying it are leaving Harvest after its price change, and the first thing they ask is whether they can bring their history with them. So the import matters more than almost anything else in the app. If it gets someone's invoices wrong, they're gone.

Real accounts aren't three clients and two projects. They're years of stuff. Old clients, deleted projects, invoices in four currencies, notes someone pasted a whole email into.

So before letting anyone near it, I made a fake account that looked like it had been used for years. Messy on purpose. Then I ran the import again.

It broke in six different ways.

A Canadian invoice was off by a cent. Quebec sales tax is 9.975%. I was storing tax rates with two decimals. A cent sounds like nothing until it's on an invoice someone's accountant is checking.

Invoice numbers stopped making sense. Most accounts number invoices 1001, 1002, 1003. One of mine used INV-0099. After importing it, Sheaf had no idea what the next number should be.

A long note got chopped. Someone had pasted almost 6,000 characters into a time entry note. My limit was lower than that, so the end just vanished. Nobody would have noticed until they needed it.

Mileage lost its miles. An expense for 120 miles came across as just an amount. The miles were gone.

One permission error killed everything. If the person importing isn't an admin, Harvest won't show them invoices. My import treated that as a fatal error and stopped. Now it brings over everything they can see and tells them what's missing.

Importing twice undid people's work. This one scared me the most. People don't switch tools in a day. They import, try it for a week, and import again to catch up. My second run was quietly overwriting things they had already fixed in Sheaf. Now it only adds what's new and leaves their changes alone.

None of these would have shown up with clean test data. Every one of them would have shown up with a real customer, probably in their first week, which is the worst possible time.

So that's my lesson, and it's not a new one: your test data is too clean. Make a version that looks like five years of real, careless use, and run everything against that.

And if you're leaving Harvest yourself, Sheaf is free while it's in beta. The import takes a couple of minutes, and now it handles the messy stuff too.

What's the weirdest thing you've found in a customer's real data?

Top comments (1)

Collapse
 
veristria profile image
StackShortlist •

Messy data is the real test. Blank fields that mean unknown vs blank fields that mean none is the one that bites me most. Keeping those separate saves a lot of cleanup later.