Bug 510022 - MS Money import: Dividends cause Unit Value = 0
Summary: MS Money import: Dividends cause Unit Value = 0
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (other bugs)
Version First Reported In: Trunk from git
Platform: Compiled Sources Microsoft Windows
: NOR normal
Target Milestone: 25.1.0
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-28 12:11 UTC by A D
Modified: 2025-09-28 17:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Unit values screenshot (113.48 KB, image/png)
2025-09-28 12:11 UTC, A D
Details
json extracts from sunriise showing dividend transaction (4.80 KB, text/plain)
2025-09-28 12:14 UTC, A D
Details
zip containing MS Money file (723.55 KB, application/x-zip-compressed)
2025-09-28 13:52 UTC, A D
Details

Note You need to log in before you can comment on or make changes to this bug.
Description A D 2025-09-28 12:11:57 UTC
Created attachment 185338 [details]
Unit values screenshot

SUMMARY
The fix for Bug 507235 has improved the import of investment transactions from MS Money (😀👍). Sensible Unit values come from buy and sell transactions (which is good), but dividend transactions have null quantity and price values, which results in zero values being entered for the Unit. It would be better to not add a Unit value when the price is zero/null.

STEPS TO REPRODUCE
1. Import MS Money .mny file containing dividend transactions
2. Go to the Unit page

OBSERVED RESULT
There are zero values for units resulting in a graph line with many dips to zero - see attached screenshot

EXPECTED RESULT
Just "sensible" unit values and a resulting graph line that doesn't drop to zero

SOFTWARE/OS VERSIONS:
built from source ff229aff81b122447689677920a8a688a12b1c45

ADDITIONAL INFORMATION
I will attach json extract from sunriise showing a dividend transaction.

Let me know if a .mny file is needed for testing and I will create one.
Comment 1 A D 2025-09-28 12:14:15 UTC
Created attachment 185339 [details]
json extracts from sunriise showing dividend transaction
Comment 2 Stephane MANKOWSKI 2025-09-28 13:13:05 UTC
Hi,

Yes could you provide a .mny file, this is easier for testing and I will be able to create a automatic unit test too.
Comment 3 A D 2025-09-28 13:52:32 UTC
Created attachment 185342 [details]
zip containing MS Money file

MS Money file contains investment account (investments and cash) with transactions:
Deposit £100 in to cash account
Buy 10 shares @ £5
Dividend paid (10 x £1)
Sell 10 Shares @ £6
Comment 4 Stephane MANKOWSKI 2025-09-28 17:09:50 UTC
Git commit 5baf314639a2c54eca55ded0843f35114429e7a1 by Stéphane MANKOWSKI.
Committed on 28/09/2025 at 17:09.
Pushed by smankowski into branch 'master'.

510022: MS Money import: Dividends cause Unit Value = 0

M  +1    -0    CHANGELOG
M  +7    -5    plugins/import/skrooge_import_mny/skgimportpluginmny.cpp
A  +-    --    tests/input/skgtestimportmny3/510022.mny
M  +19   -0    tests/skgbankmodelertest/skgtestimportmny3.cpp

https://invent.kde.org/office/skrooge/-/commit/5baf314639a2c54eca55ded0843f35114429e7a1