Bug 508896 - Sorting Ledger by Reconcile state causes Balance column to stop showing numbers.
Summary: Sorting Ledger by Reconcile state causes Balance column to stop showing numbers.
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.2.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-29 14:13 UTC by dave
Modified: 2025-09-08 22:38 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dave 2025-08-29 14:13:21 UTC
SUMMARY
In Ledger \ under Normal view tab when Sorting by Number, Amount, Category, Reconcile state, Type, or Payee causes Balance column to display three dashes.

Sorting by Date entered, Entry Order, Post date, Reconciliation date and Security display correctly.

This only happens in Ledger - Normal view tab.  Reconciliation view and Search view tabs display as expected.

STEPS TO REPRODUCE
1. Open Configure KMyMoney menu.
2. Select Ledger in left hand column.
3. Select Sorting \ Normal view tabs.
4. Place any of Number, Amount, Category, Reconcile state, Type, or Payee in right hand sort box and move to the top of the list.

OBSERVED RESULT
Click Apply and the Balance column changes to three dashes.

However, the displayed Balance under the ledger is correct.

EXPECTED RESULT
Entries to sort by chosen option.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Comment 1 dave 2025-09-08 17:51:36 UTC
**  Correction:  Reconciliation view and Search view tabs do not display as expected.  **
Comment 2 Jack 2025-09-08 19:20:54 UTC
This is working as designed - the running balance in the ledger(s) is only shown if the date is the first sort item.  I would have to hunt to look whether there is already a wishlist filed to lift this restriction.  There was a discussion about calculating the running balance bottom to top if the sort was by date descending, but again don't remember if there is a wishlist filed for this.
Your "Expected result" is "Entries to sort by chosen option."  From your description, this is happening correctly it is just that for any first sort item other then the date, the running balance is not calculated and displayed."
Comment 3 dave 2025-09-08 20:54:44 UTC
Kmymoney 5.1.3 defaulted to my "Expected result".  

Undocumented lost functionality after an upgrade seemed like a bug.
Comment 4 Jack 2025-09-08 22:38:15 UTC
Perhaps it doesn't matter, but please clarify whether your "Expected results" refer to the actual sort order or to the display (or not) or the running balance.  They are somewhat separate issues.  
As far as I can tell, all versions adjust the sort order as expected.
However, I dug out an old 5.1.3 appimage, and was very surprised to confirm that changing the sort order so date is not the first item still displays the running balance.  Given I was wrong about that, I'm not sure it helps that I'm about as sure that the decision to not show the running balance was intentional.
As a minor point, I can confirm that if the date the first sort item, if it is ascending, then the balances are calculated top to bottom, but if descending (most recent at the top) then the balances are calculated bottom to top.