Bulk transaction move

Mike or Penny Novack stepbystepfarm at mtdata.com
Fri Dec 26 11:49:08 EST 2014


Some additional advice from somebody who used to do this professionally 
(who was paid to design/write ad hoc programs to do this sort of mass move).

1) The first step (not yet mentioned) is identifying WHICH transactions 
are to be moved. I am assuming not all, because THAT you could do within 
gnucash. In other words, you have to write a program (in something -- my 
favorite languages would be different from yours, and BTW, I would 
consider say the bash shell plus standard utilities a "language").

    You TEST this (did it select all the transactions you wanted to move 
and only the transactions you wanted to move)

2) The second step it to write this thing as described below (for 
example). But don't run it yet. First create a COPY of the file you 
propose to modify. You run against that file (not, for the moment your 
real books) and see what happens. This is a TEST that may become PROD. 
In other words, if it worked exactly as desired, gnucash opens THESE 
books without crashing or anything else nasty and the transactions were 
moved correctly, you can rename the files, PROD to something else and 
TEST to PROD and you are done. If there were bugs, after a try at fixing 
them, repeat this step.

Michael D Novack


farleykj wrote:

>Something like this might be possible if you:
>(1) Turn off file compression in the preferences.
>(2) Save a copy of your data file under another name.
>(3) Edit the resulting XML codes to swap the accounts. This kind of a tricky
>thing, because the account IDs used in the file are extremely long unique
>identifiers. You'll have to figure out the two you want to swap and be
>extremely careful about the transactions being changed. Personally, I
>wouldn't want to do something like this unless I was using Emacs or a
>similar powerful macro-capable editor.
>
>If it was me, I'd likely (and I have) put in some music and do all those
>transactions one at a time. The trouble with fiddling with this stuff is:
>(a) How in the world do you know, once you're done, that you got *all* the
>transactions? If your account balances don't match up when you read in the
>altered file, how do you find which ones were missed?
>(b) As previously mentioned, it's an "unsupported" thing. It could cause
>Gnucash to crash when you attempt to read the modified file in, etc. And if
>you corrupt the file due to some mistaken action, it'll be a real chore to
>find the error, or you'll have to start again from the beginning.
>
>In the end, I guess it depends on how comfortable you are editing XML code.
>Good luck.
>
>
>
>-----
>Ken Farley
>--
>View this message in context: http://gnucash.1415818.n4.nabble.com/Bulk-transaction-move-tp4674561p4674645.html
>Sent from the GnuCash - User mailing list archive at Nabble.com.
>_______________________________________________
>gnucash-user mailing list
>gnucash-user at gnucash.org
>https://lists.gnucash.org/mailman/listinfo/gnucash-user
>-----
>Please remember to CC this list on all your replies.
>You can do this by using Reply-To-List or Reply-All.
>
>  
>

-- 
There is no possibility of social justice on a dead planet except the equality of the grave. 



More information about the gnucash-user mailing list