xaccTransSetCurrency and Bug 763146

Mike Alexander mta at umich.edu
Thu Mar 17 21:22:31 EDT 2016


> On Mar 17, 2016, at 6:55 PM, John Ralls <jralls at ceridwen.us> wrote:
> 
> Neither. I'm used to finding bugs like that because the early authors weren't thinking about multi-currency transactions and by the time you started to the codebase had become far too bloated and convoluted to track down all of the problems.
> 
> In fact I even wrote a test that specifically checked that this worked wrong because I didn't recognize it as a bug and was documenting with the tests the existing behavior so that when we got to rewriting the test would show that the behavior had been preserved through the rewrite. That was 4 1/2 years ago.
> 
> What I'm worried about is that there's code in GnuCash that depends on that bug. I'm less worried today because I went through every call of xaccTransSetCurrency and almost all of them operate only on new transactions. The few that don't (cap-gains.c, Scrub.c) should be OK with the change. With that done I've pushed the commit.

That makes sense.  I should have noticed this when I was working in that area, but didn't.  I think I've seen things wrong as a result of this and didn't spend enough time to track it down.  I saw you had pushed the change so figured you had convinced yourself it was ok.  Thanks for fixing it.

      Mike




More information about the gnucash-devel mailing list