https://bugs.kde.org/show_bug.cgi?id=525151

            Bug ID: 525151
           Summary: Finished schedules are incorrectly offered as matches
                    during statement import
    Classification: Applications
           Product: kmymoney
      Version First 5.2.2
       Reported In:
          Platform: Mageia RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: importer
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

DESCRIPTION

During statement import, KMyMoney proposes matching an imported transaction
with a scheduled transaction that is already finished. The schedule is no
longer shown in the Scheduled Transactions view, but it is still considered by
ScheduledTransactionMatchFinder.

STEPS TO REPRODUCE
1. Create a finite estimated scheduled withdrawal.
2. Enter its final occurrence so that the schedule becomes finished.
3. Import a bank transaction into the same account with a date and amount
within the schedule matching tolerances.
4. Observe the proposed scheduled transaction match.

OBSERVED RESULT

KMyMoney asks whether the imported transaction should be associated with the
already finished schedule.

EXPECTED RESULT

Finished schedules must not be considered as match candidates during statement
import.

REGRESSION TEST

A regression test creates a schedule with an end date two days in the past,
records the final payment, advances nextDueDate beyond the end date, and
verifies that isFinished() returns true. Before the fix, the imported
transaction is incorrectly reported as MatchPrecise instead of MatchNotFound.

Adding this guard in
ScheduledTransactionMatchFinder::findMatchInMatchCandidatesList() fixes the
problem:

    if (schedule.isFinished())
        continue;

All 34 matchfinder tests pass after the fix.

RELATED REPORTS

Bug 524736 concerns the opposite state error, where a pending final occurrence
was incorrectly considered finished:
https://bugs.kde.org/show_bug.cgi?id=524736

Bug 327497 is an older and broader report about unrelated scheduled transaction
matches. It was closed as WORKSFORME without a reproducer:
https://bugs.kde.org/show_bug.cgi?id=327497

SOFTWARE/OS VERSIONS
Operating System: Mageia 10
KDE Plasma Version: Not applicable, LXQt session
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.0
KMyMoney Version: 5.2.2

ADDITIONAL INFORMATION

The issue is reproducible with KMyMoney 5.2.2. A local RPM containing the
candidate fix has been tested successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to