Bug 384659

Summary: Weboob / Boobank date condition
Product: [Applications] skrooge Reporter: Guillaume Stamm <guillaume.stamm>
Component: generalAssignee: Stephane MANKOWSKI <stephane>
Status: RESOLVED FIXED    
Severity: wishlist CC: stephane
Priority: NOR    
Version First Reported In: 2.9.0   
Target Milestone: 25.1.0   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Guillaume Stamm 2017-09-13 12:24:43 UTC
Hello,

I have a small feature request on boobank import.

When skrooge looks for operations with boobank the date condition is set to ">2000-01-01"
This date condition does not change from time to time, at each import.

It would be nice to either:
1- automatically set this date to the last_download_date_for_this_account
or
2- add a parameter, on weboob backend settings to be able to set this date.

Why I am requesting this??

On some bank the number of imported operation could be huge! lots more than 1000.

There is an import performance issue (this is limited: I tested on command line ">2000-01-01" and ">2017-07-01" with only 20% improvement)

But my real need, is not performances, it is on the old operations (many of them), previously imported by .qif, .ofx... (since years), for these operations boobank/skrooge import them again, and I have no other choice than to delete them… but at next boobank import they come again !!  :-(

Remark: it is not the case for operations, already imported by boobank, I think that scrooge stores an operation identification number to avoid import duplicates.

I hope, I was clear enough!!
Thanks
Guillaume
Comment 1 Guillaume Stamm 2017-09-13 13:01:26 UTC
I found this part of code: skgimportpluginbackend.cpp

    if (currentList != lastList || !lastDownload.isValid()) {
        nbToDownload = 99999;
        fromDate = QStringLiteral("2000-01-01");
    } else {
        nbToDownload = qMax(lastDownload.daysTo(QDate::currentDate()) * 10, qint64(20));
        fromDate = SKGServices::dateToSqlString(lastDownload.addDays(-4));
    }

but I do not know why I am not in the second case, using "lastDownload"
Comment 2 Stephane MANKOWSKI 2017-09-13 13:09:53 UTC
This date comparison was done for download optimization. Exactly as you want. I recently discovered that this didn't work as expected.
I did a correction with this commit:
https://cgit.kde.org/skrooge.git/commit/?id=ad57802dc55e237e2585fcac4f042b4aca9cbbb5

So, this should work correctly on next version (2.10.0) or with the git version.

So, I close this incident.