Wow, 12 hours of coding, debugging, grepping and wrestling through the code
for a 2 line patch :-)
What a satisfaction to find it. I learned a lot about QIF, gnucash, gdb,
scheme and what not.

So, the QIF importer did not copy the new color attribute that's been added
to Accounts.

The merge_children method checked this attribute when comparing two
Account's,
so it compared #<colorcode> to 0x0... and considered the 2 accounts to be
different.

And that's why it didn't merge those (identical) accounts.

Another way of fixing this is just not comparing the colors when determining
whether 2 accounts are equal, but I assume this has been given though
before.

Best regards,

Tom.
Index: src/import-export/qif-import/qif-to-gnc.scm
===================================================================
--- src/import-export/qif-import/qif-to-gnc.scm	(revision 18901)
+++ src/import-export/qif-import/qif-to-gnc.scm	(working copy)
@@ -133,6 +133,8 @@
                  new-acct (xaccAccountGetCommodity same-gnc-account))
                 (xaccAccountSetNotes
                  new-acct (xaccAccountGetNotes same-gnc-account))
+                (xaccAccountSetColor
+                 new-acct (xaccAccountGetColor same-gnc-account))
                 (xaccAccountSetCode
                  new-acct (xaccAccountGetCode same-gnc-account))))
 
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to