-
-
Notifications
You must be signed in to change notification settings - Fork 313
new: add sequence number in transactions panel #7080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@n-stein |
@whalley There was a bug (introduced with #6860), which wrongly filters out transactions in multi-account panels (like All Transactions), when "Ignore Future Transactions" is set (if a transaction has a future date, all transactions with larger ID are ignored). This bug has been fixed in this PR. |
The ID will be longer (about 16 decimal digits) for new entries in 1.9.0. Only the transaction panels that can open directly from navigation tree at left will show an SN in addition to ID. The ID will still be available and it will be the real ID, as before. |
@rmelillo76 @guanlisheng as FYI |
Thanks, happy to help. Issue #7082 has been opened. |
For issue 2 we should verify that |
I found issue 1 occurs when the stored column order contains UDFC entries which don't exist in CUSTOMFIELD_V1. This may occur since SETTING_V1 is cross-database -- you can open db1 and the UDFC columns will be stored in the order, but when you open db2 which doesn't have any UDFC fields it still loads them into m_real_columns which throws off the order. |
I'll create a new issue for these and fix them. |
@n-stein |
To be fair, these bugs are unrelated to your SN change. They are an artifact of the column order save/restore changes made for #6847, so mostly my fault... I simply noticed them when I glanced at the SN column. In hindsight I should have debugged further before commenting in this thread, so my apologies. |
No problem, good that you noticed and you know how to fix it. |
This PR adds a sequence number in transaction panels.
Motivation
The transaction ID used to be assigned by SQLite and it was essentially a sequence number, indicating the order of creation. With the introduction of SUID (see #6964), the transaction ID is a long number and its appearance in transaction panels becomes less convenient.
The ID column in transaction panels is useful for sorting (by order of creation), although the exact value of a transaction ID is essentially opaque (i.e., of little interest to the user).
This PR adds one more column in transaction panels, containing a sequence number (SN) for each transaction, which is assigned sequentially (starting with 1) when a transactions list is generated. The order of SN is equivalent to the order of Date/ID, i.e., transactions are sorted by Date and ID, and then an SN is assigned to them sequentially.
From user's perspective, either the SN or the ID can be used for sorting. Users may hide one of the two columns, according to their preference. The SN has the advantage that it is a shorter number, but it may be confusing since it is assigned dynamically. On the other hand, the ID is static, but it is a longer number and may look random and confusing.
Design
The displayed SN for executions of scheduled transactions in a transactions panel, follows the same rules as the displayed ID. The SN of scheduled transactions is empty, while the SN of scheduled splits appears as ".", in order to distinguish the scheduled transactions from the rest of transactions, when either the SN or the ID column is used.
Implementation
Model_Checking::Full_Data
: add longSN
, wxStringdisplaySN
.Fused_Transaction
: add structSorterByFUSEDTRANSSN
.mmCheckingPanel::filterTable()
. Fix bug with wrong filtering when "Ignore Future Transactions" is set.TransactionListCtrl::EColumn
: addCOL_SN
at the end of the list (in order to preserve already assigned column numbers).TransactionListCtrl
.TransactionListCtrl::OnColClick()
, break the association between Date and ID.This change is