Are there any known show-shoppers regarding "un-merging" transactions?
Hello All,
I can code in C, Java, Python. I haven't used (or really looked into) your API yet. I see some good info for beginners from Mr. Bray and Mr. Beesley.
I want to write something that will take a merged transaction, rebuild the two source transactions, then remove the merged transaction. At first look, all of the original data appears to exist in the Raw Data of the resultant (merged) transaction. I'm sure there are complex considerations, such as being able to re-merge again, handling reconciled status, etc..
I know that you can undo a merge if you catch it immediately (by Edit -> Undo). But I need to undo a bunch of merges that happened some time ago. I see in the forums that people have wanted this feature for years.
Which brings me to my question. This feature hasn't been added yet! Either it is low on the priority list, or it's a difficult problem, or both :) Should I take it on or are there good reasons for me to avoid trying?
Thanks very much,
Jon
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Stuart Beesley ... on 05 Jan, 2025 12:14 PM
…
Support Staff 2 Posted by Sean Reilly on 05 Jan, 2025 08:46 PM
Hi John,
Ah yes, this is definitely do-able. If a transaction (AbstractTxn) has a property
ol.match-type = 3
then you should be able to do something like the following to record the original downloaded transaction:The OnlineTxnMerger object does have a method called .unmergeTxn() which generally does some of this, but I don't use it internally to undo merges... IIRC it's used to handle situations in which a transaction is merged with a local transaction that was already merged with another.
That's the high level way to do it, but I'm sure I've probably missed some details.
Thanks,
Sean
--
Sean Reilly
Developer, The Infinite Kind
https://infinitekind.com
3 Posted by Stuart Beesley ... on 05 Jan, 2025 10:12 PM
Unmerge would make a pretty cool / useful right click context menu action on selected transactions.
4 Posted by -Kevin N. on 05 Jan, 2025 11:04 PM
+1 for Unmerge.
5 Posted by jgfolsom on 05 Jan, 2025 11:18 PM
Thanks guys! Yes, I envisioned a right-click menu option, but I figured that might be too big of an undertaking for me. I'm going to be moving slowly whenever I can scrape together a few minutes to work on it :)
For this to be fully fleshed out, it would be nice if there were some kind of icon to denote merged transactions (similar to the "confirmed"/"unconfirmed" circles). But I'm guessing that would be something Infinite Kind would need to add. Am I right?
Anyway, thanks again! I'll start poking around the API...
6 Posted by Stuart Beesley ... on 05 Jan, 2025 11:32 PM
Yes, any new visual icon on the txn register could only be done by IK and core code really. Certainly an extension could not (should not) attempt to do this. But an extension can easily hook into the right click context menu and choose to show itself, or not, depending on the selected txns’ merge status, and then unmerge when clicked.
Support Staff 7 Posted by Sean Reilly on 06 Jan, 2025 03:27 PM
I've just added an icon to indicate merged transactions (attached), and will look into adding a register menu entry to unmerge merged transactions. It's likely not possible to fully unmerge, but we'll see how close we can get.
Thanks!
Sean
Support Staff 8 Posted by Sean Reilly on 06 Jan, 2025 05:03 PM
I've also added an "Undo Merge" entry to the register's popup menu and it seems to work! The "undo" support for it isn't quite right, but that should be fixable.
--
Sean Reilly
Developer, The Infinite Kind
https://infinitekind.com
9 Posted by Stuart Beesley ... on 06 Jan, 2025 08:47 PM
😃 👌 👍
10 Posted by -Kevin N. on 06 Jan, 2025 09:37 PM
Thanks Sean, and what Stuart said. :)
11 Posted by jgfolsom on 07 Jan, 2025 08:54 PM
You guys are amazing! Thanks, Sean, for the icon and menu entry.
I'm not sure of the process here... Is there a way for me to see/use the a version of MD with the icon/menu changes applied? Or will they be in a future release?
Also, I had assumed this would take much longer than it has! I'm not quite ready to test/flesh out the unmerge functionality yet, but I don't want to hold anyone back who wants to keep working on it. So, feel free!
Thanks again!
12 Posted by dwg on 07 Jan, 2025 09:00 PM
It is in an Alpha release that is being tested, it should not be used for production. There are some issues still being worked so this will not be a build that is released.
In due course it will come out in a stable release.