huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
234 stars 80 forks source link

Should import CSV continue on index error? #3000

Open RafaPolit opened 4 years ago

RafaPolit commented 4 years ago

What should be the expected behavior if you import a CSV that would produce errors (in this particular case, indexation errors)?

Scenario A

Advantages:

Scenario B

Advantages:

I'm not sure. Perhaps an option on import? "Continue on error", leave the end user the decision?

At any rate, after #2931 and even after #2993 the process is stopping on first error. We should decide if this is what we want.

@txau @simonfossom

txau commented 4 years ago

@RafaPolit I guess it depends on the development effort. If we have to pick a good default, I'd say halt on errors has more advantages than the other one. Of course it is situational and there are different use cases. If implementing the option for users to choose isnot that much extra development, I'd go for that one with still "halt on errors" as the default.

simonfossom commented 4 years ago

Hmm... I would say that this is one of those We don't know situations where we should ask if it doesn't make a difference for us.

If we halt on error user must redo import from that line further. But there might be more errors in the import. So we make him redo many times over.

If we give a log of lines that failed and why, he can fix all errors at once and be done.

If we encourage user to do bulk actions we shouldn't waste his time. I would go with scenario B

txau commented 3 years ago

@simonfossom the decision was made considering development effort over UX, still the discussion is valid. I think the process could be more fine grained with some options: