GnuCash
Contact   Instructions
Bug 797042 - "OK" button in OFX importer doesn't work if nothing is imported
Summary: "OK" button in OFX importer doesn't work if nothing is imported
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - OFX (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: import
QA Contact: import
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-12 02:15 EST by Mike Alexander
Modified: 2020-04-11 17:35 EDT (History)
8 users (show)

See Also:


Attachments

Description Mike Alexander 2019-01-12 02:15:11 EST
If you import an OFX or QFX file that contains nothing that isn't already in the GnuCash file (so the list of imported transactions is empty) then the OK button does nothing.  It should close the import dialog.
Comment 1 David Cousens DaveC49 2019-06-06 01:28:09 EDT
Mike if there are no records to be imported why would you not use the Cancel button?

In GnuCash 3.5, the OK clicked routine iterates through the transactions displayed in the treeview and checks the flags in the import info. Unless these are set to ADD, UPDATE or CLEAR ( should be SKIP if not marked for import), then it is a no-op and a call to  gnc_gen_trans_list_delete() closes the importer gui. 

Not sure for earlier versions- which version did this occur with?
Comment 2 John Ralls 2020-03-10 13:06:18 EDT
I'd think that if there are no transactions to import the right thing to do would be to pop a messagebox saying so instead of an empty match dialog.
Comment 3 Jean Laroche 2020-03-13 02:58:48 EDT
I have submitted a PR for this.
Comment 4 Geert Janssens 2020-03-27 07:19:09 EDT
PR has been merged into maint.

Thanks!
Comment 5 Jim DeLaHunt 2020-04-11 17:15:12 EDT
I reproduced this on GnuCash 3.6 on macOS 10.13.6 High Sierra. 

I find this behaviour annoying also. I am looking forward to having this fixed.

(In reply to David Cousens DaveC49 from comment #1)
> …if there are no records to be imported why would you not use the Cancel
> button?

I want to use the "OK" button because it means something different than the "Cancel" button. The "OK" button means, "what this dialogue proposes is fine by me, I want to proceed". The "Cancel" button means, "what this dialogue proposes is not acceptable, I want to back up and do something different". If the OFX file has no transactions, that is fine by me, and I want to proceed. No transactions get imported. Maybe GnuCash makes a hidden notation that it has seen the contents of this OFX file. But to tell the application, "it is not acceptable that this OFX file have no transactions", is the wrong message. The app should not force the user to say that.
Comment 6 Jim DeLaHunt 2020-04-11 17:19:29 EDT
Note there are two variations on this scenario:
1. where a user imports the same OFX file for a second time, and
2. where a user imports an OFX file which contains zero transactions.

If GnuCash pops up a dialogue "saying so", as John proposes in comment #2, then I suggest it put up different messages for these two variations.  This will surprise the user less.

I do most of my transaction imports quarterly, or even less often. I'm often overdue and forgetful about my bookkeeping. I will routinely be unsure if I have imported an OFX file already, so will try it again to be sure. It would be nice if GnuCash were to tell me when it recognises an OFX file it has already seen.
Comment 7 Jean Laroche 2020-04-11 17:35:30 EDT
With the new behavior, it does tell you that it found N transactions but none are for review (i.e., they were all previously imported)

Note You need to log in before you can comment on or make changes to this bug.