fava icon indicating copy to clipboard operation
fava copied to clipboard

Add option to skip duplicates when exploring entries on import extract

Open zenitraM opened this issue 2 years ago • 2 comments

Hi! I use the Importer UI with some API-driven importers, for which the downloaded files are really only config files yet they read the full history from the origin bank APIs (like https://tariochbctools.readthedocs.io/en/latest/importers.html#nordigen).

Those output a big chunk of past entries, sometimes from multiple banks and not necessarily in chronological order. And, most of the time, a big percentage of those entries will be duplicated - in some importers the de-duplication is done by the importer against the bank's entry ID so I'm almost completely sure they are not false positives.

So I'm only interested (most of the time) on checking the non-duplicate entries, however in some cases (like combining multiple banks into a same importer, or reconciling a long tail of history) they will be 4-5 new/non-duplicate entries out of a list of >400 entries, in the middle of the list.

Browsing them and finding them with the next/back buttons is a bit awkward, so to make this easier, I've added a checkbox that will only make the prev/next buttons in the Extract window move only across the non-duplicate entries, which is enabled by default - which I think may be a more desired standard behavior?

It looks like this on the UI:

image The checkbox make the buttons go to the next and previous non-duplicate items - and if there's none left, they will just go to the first/last entry (to finalize the import, in the latter case).

I found this quite useful for my workflow but it may not fit everyone's usage or the project's alikes - happy to address any feedback or tweaks. :blush:

zenitraM avatar Aug 23 '23 19:08 zenitraM

Hi, thanks for the PR!

It might be confusing to have both "ignore duplicate" and "skip duplicates", those sound quite similar to me. Would maybe having this behaviour triggered when Ctrl-Clicking on the button also be an option instead of having the checkbox?

yagebu avatar Sep 06 '23 16:09 yagebu

Agree, I found it a bit confusing too but couldn't think how to express it better. What about something like this? With > used for the next entry, >> to jump to the next non-duplicate.

image

zenitraM avatar Sep 08 '23 17:09 zenitraM