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
Bug 797631 - Superfluous account selection dialog on first online transaction retrieval #651
Conversation
|
|
|
Were As to question 6 I misunderstood the last patch. On a second look I understand what you're doing and why the unit test is broken: You've taken a general purpose function used for all of the importers and made it AQBanking-only. That's not going to work. |
If
I think that this issue is difficult to solve from the layering perspective. |
I was clearly talking outside of my area of knowledge. Please ignore that comment and sorry for adding confusion. |
Yeah, I got misled by that function name too. @pkzw let's work on understanding (or maybe just helping me to understand) the underlying problem a bit in the bug report before doing any more coding. |
@jralls that's a good idea. I will add a comment with my (current) understanding to the bug report. |
I have created a new version of the patch within a new local branch pkzw_bug797631a based on commit feee495 from gnucash/maint. What is the easiest way to replace the changes of the current PR by the changes of that branch? |
Just |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better and cleaner than the predecessor.
@@ -694,6 +696,10 @@ save_kvp_acc_cb(gpointer key, gpointer value, gpointer user_data) | |||
guint32 ab_account_uid; | |||
const gchar *ab_accountid, *gnc_accountid; | |||
const gchar *ab_bankcode, *gnc_bankcode; | |||
#ifdef AQBANKING6 | |||
gchar *ab_online_id; | |||
const gchar *gnc_online_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -682,7 +683,8 @@ static void | |||
clear_kvp_acc_cb(gpointer gnc_acc, gpointer ab_acc, gpointer user_data) | |||
{ | |||
g_return_if_fail(gnc_acc); | |||
/* Delete complete "hbci..." KVPs for GnuCash account */ | |||
/* Delete "online-id" and complete "hbci..." KVPs for GnuCash account */ | |||
gnc_import_delete_acc_online_id((Account *) gnc_acc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the point of the indirection. Why not just call gnc_account_delete_map_entry(account, "online_id", NULL, NULL, FALSE);
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I have removed the whole commit.
The function is renamed to gnc_ab_create_online_id. It shall be callable from the Online Banking Setup tool in order to (re-)calculate the online id for changed account matches
…rieval The online id, which is needed to find a GnuCash account for a transaction or the balance retrieved from an online account, is already assigned to each matched GnuCash account within the Online Banking Setup tool. The online id is removed from the GnuCash account if it is no longer matched with an AqBanking account.
See Bug 797631 for more details.