GNOME Bugzilla – Bug 721294
Duplicate prompt for sub account creation
Last modified: 2018-06-29 23:23:11 UTC
My MO is to copy-paste the account, which in this case is a 2-level thing and I append ":thirdLevel" which emits a confirmation to create a sub-account prompt, twice. If I say yes to both, I get the, "Account already exists" message, so I just cancel the second prompt. I just installed 2.6.0. The 2.4.13 version didn't manifest this behavior. Please let me know if you need more details. BTW, I have built GC before, but it's just too daunting under Windows 7, however, if someone were to do a 2-phase build, e.g., a Ming library and do all the high-level stuff in Visual Studio 2010, I'd love to debug it myself. (I'd volunteer to do some of the migration myself, but I have a day job.)
I can confirm this behaviour on Linux also.
I can confirm this behaviour on the Mac also.
I also get this behavior on Windows.
This occurs for me as well. It appears isolated to the postgres backend, and happens across operating systems -- both Windows 7 and Linux (Ubuntu 13.10).
Hmm, I can't immediately reproduce this on 2.6.2. Perhaps I'm trying the wrong steps as yours are fairly dense. Can you write a more detailed step by step guide to reproduce the bug ?
*** Bug 725592 has been marked as a duplicate of this bug. ***
Tried again using the description in bug 725592, but it doesn't happen on my system (sqlite database). Hmm, comment 4 suggests it's only happening on the postgresql database. I'll try that one.
Can't even reproduce with a postgresql database :( I'll need a more reliable way to reproduce before I can look into this...
This no longer happens for me on 2.6.2, linux, xml.
I use MySQL database. I had an expense account like, "Food:Groceries", then I would highlight the account and append, "Fruits", so my new account would look like, "Food:Groceries:Fruits" and I'd get a prompt saying the account didn't exist and if I'd like to create it. I would click, "Yes" and GC would open a "Properties" dialog which I'd fill in and click "Ok" when done, but then it would prompt again to create the account. At this point, I would just cancel the second prompt and everyone was happy. I do this because it's easier than going to the account hierarchy and creating all accounts before using. I like to create them on the fly. I'm pretty sure this also happens if I decide to organize my loans, e.g., I have an existing "Loans" account, then I edit the field in the transaction to show I made a payment to my new account, "Loans:VW2013" which induces the process to create a new account with the property panel and repeats the "Create new account" prompt after I click "Ok" on the first one.
(In reply to comment #10) > I use MySQL database. > I had an expense account like, "Food:Groceries", then I would highlight the > account and append, "Fruits", so my new account would look like, > "Food:Groceries:Fruits" > and I'd get a prompt saying the account didn't exist and if I'd like to create > it. I would click, "Yes" and GC would open a "Properties" dialog which I'd fill > in and click "Ok" when done, but then it would prompt again to create the > account. > > At this point, I would just cancel the second prompt and everyone was happy. > I do this because it's easier than going to the account hierarchy and creating > all accounts before using. I like to create them on the fly. > > I'm pretty sure this also happens if I decide to organize my loans, e.g., > I have an existing "Loans" account, then I edit the field in the transaction to > show I made a payment to my new account, "Loans:VW2013" which induces the > process to create a new account with the property panel and repeats the "Create > new account" prompt after I click "Ok" on the first one. Art, did you actually retry this yourself with gnucash 2.6.2 ? You seem to write from memory. But regardless, I still can't reproduce based on what you say here. If you can reproduce, I'll need more details. Especially what you do between typing ":Fruits" and getting the prompt. I mean how do you leave the text entry field ? Do you hit the tab key, or an enter key, or an arrow key, or do you click with the mouse ? I tried most of them but none seem to get me into this situation. You may also want to check the gnucash trace file for hints: http://wiki.gnucash.org/wiki/Tracefile
I experienced this issue again in 2.6.2 by entering a non existent account in the scheduled transaction editor. I was prompted to create the account. I clicked Yes and was immediately prompted to create the account a second time. I was creating a scheduled transaction by right-clicking on a transaction in an account register and selecting Schedule. However, when I cancelled creating the scheduled transaction and repeated the process again, I was only prompted to create the account once. Unfortunately, I couldn't reproduce this even by closing gnucash and starting again.
Created attachment 271681 [details] GC_262_Bug_AccountAlreadyExists_140312.PNG Screen capture mentioned in comment.
Geert, I just installed GC 2.6.2 built from rev 667b581+ on 2014-03-02 - from SF and the bug is still there. This time, I entered "Food" and the sliding menu appears, so I hit the "End" key and typed, ":Test" and Ok. I get a prompt, The account Food:Test does not exist. Would you like to create it? To the "Yes" or "No" buttons, I click "Yes". I get another prompt with the same dialog. Again, I click "Yes". Now, I get the property dialog for "New Account - Food:Test". I click, "Ok" and I get the same prompt again. At this point, I get the, "There is already an account with that name." dialog box. So, I screen captured it and am attaching it to this entry. You'll notice from my screen capture ("Snipping Tool" on Windows 7) that I'm running MySQL. MySQL runs under WampServer v2.2. (I sync the database on a Linux server and monitor it with Oracle's workbench, but is independent of GC.) [I committed the attachment, but this comment didn't appear - I didn't realize this was a separate commitment process.]
Ah, I finally managed to reproduce this. The key to this issue is that it only happens when adding a new account in split view mode. Richard's comment 12 lead me into the right direction as I could reproduce this in the scheduled transaction editor as well. Afterwards I noticed in Art's screen capture that he was creating the new account while the register was is split view mode. With my register set to split view I get the same behaviour. Now only to figure out why this happens...
I'm running Gnucash 2.6.3 on OSX 10.9 (XML File backend) and the bug is still there. To recreate: Open the register of an account (e.g. Assets:Current:Bank A) Create a transaction with a split going to a new account (e.g. Expenses:DoesNotExist). When you hit tab or return you are prompted to create this account. When you click yes, you get prompted a second time if you want to create this account. When you say yes then the New Account details popup appears and you can fill in the details on the new account. When you hit Ok, you are warned that the account already exists and then you return to the register. I now just hit No on the second prompt to create the account and this avoids the warning at the end but still creates the account.
*** Bug 735230 has been marked as a duplicate of this bug. ***
*** Bug 738738 has been marked as a duplicate of this bug. ***
*** Bug 738753 has been marked as a duplicate of this bug. ***
*** Bug 754498 has been marked as a duplicate of this bug. ***
It may not be clear from the above but I don't think the backend is significant as I get it with XML too.
Sorry, point being Component SQL isn't appropriate now, more like Register, I think
Agreed, and so changed.
I am still able to reproduce this issue with 2.6.15 on Windows 10. Expected workflow at end. * * * 1. Create transaction with several splits 2. On last split to enter, enter sub-account name that doesn't exist. Press Tab. "The account [account name] does not exist. Would you like to create it?" 3. Click No. Focus is returned to Transfer field. 4. Press Tab. "The account [account name] does not exist. Would you like to create it?" 5. Click Yes. "The account [account name] does not exist. Would you like to create it?" 6. Click No. Prompt is dismissed. "New Account - [account name]" 7. Click Cancel. Account editor dismissed. "The account [account name] does not exist. Would you like to create it?" 8. Click No. Prompt dismissed. Focus returned to Transfer field. 9. Press Tab. "The account [account name] does not exist. Would you like to create it?" 10. Click Yes. "The account [account name] does not exist. Would you like to create it?" 11. Click Yes. "New Account - [account name]" 12. Click OK. "New Account - [account name]" 13. Click OK. "There is already an account with that name". 14. Click Close. Focus returned to "New Account". 15. Click Cancel. Focus returned to Transfer field. 16. Click Tab. Account name accepted. Expected: when the user clicks Yes on the prompt, the New Account dialog is displayed instead of the user being asked again if they want to create the account. Currently the Expected result presents only when no additional splits to the transaction are entered when the new account is to be created: 1. Create transaction with no splits. Enter [account name] in the Transfer field. Press Tab. "The account [account name] does not exist. Would you like to create it?" 2. Click Yes. "New Account - [account name]". 3. Click Cancel. Focus returned to Transfer field. * * * 1. Create transaction with several splits 2. On last split to enter, enter sub-account name that doesn't exist. Press Tab. "The account [account name] does not exist. Would you like to create it?" 3. Click Yes. "The account [account name] does not exist. Would you like to create it?" 4. Click Yes. "New Account - [account name]" 5. Click Cancel. "New Account - [account name]" 6. Click Cancel. "The account [account name] does not exist. Would you like to create it?" 7. Click Yes. "New Account - [account name]" 8. Click Cancel. Focus returned to Transfer field. Expected result: again the user is to be prompted only once. The user also should not be prompted after clicking Cancel in the "New Account" dialog. Given the observations above, correcting such that the user is only prompted once will likely prevent the user from being prompted after pressing Cancel in the "New Account" dialog. * * * * * Expected workflow: 1. Create transaction with several splits 2. On last split to enter, enter sub-account name that doesn't exist. Press Tab. "The account [account name] does not exist. Would you like to create it?" 3. Click No. Focus is returned to Transfer field. 4. Press Tab. "The account [account name] does not exist. Would you like to create it?" 5. Click Yes. "New Account - [account name]". 6. Click Cancel. Account editor dismissed. Focus returned to Transfer field. 7. Press Tab. "The account [account name] does not exist. Would you like to create it?" 8. Click Yes. "New Account - [account name]". 9. Enter details and click OK. Account editor is dismissed. Account name accepted. Focus moves to DR field.
Thanks for taking the time to report this. This issue has been reported in the more recent bug 777949 as well and just got fixed. So all that is left to do is to mark this one as a duplicate. The fix should go into 2.6.16 to be released soon. Should you still experience this issue, feel free to reopen. *** This bug has been marked as a duplicate of bug 777949 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=721294. Please update any external references or bookmarks.