After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745101 - No warning when quitting with unsaved file
No warning when quitting with unsaved file
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
2.6.5
Other Linux
: Normal blocker
: ---
Assigned To: gnucash-ui-maint
gnucash-ui-maint
Depends on:
Blocks:
 
 
Reported: 2015-02-24 17:46 UTC by isaac.accounts
Modified: 2018-06-29 23:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description isaac.accounts 2015-02-24 17:46:18 UTC
There is no warning if you quit GnuCash but have not saved a new book/file.

This caused me to loose 2 hours of work setting up my accounts. Unlike most money management software, GnuCash also does not apparently create an initial book for you.

However the save command was disabled, which lead me to believe that a file was in fact created and had been automatically saved. Traditionally, a program should leave the Save command enabled and redirect the request to the Save As command. This removes the ambiguity of the Save command being disabled.
Comment 1 isaac.accounts 2015-02-24 17:47:34 UTC
To clarify: 

Unlike most money management software, GnuCash also does not apparently create an initial book for you -- however due to the Save command being disabled I was under the impression that it did create a file for me, and that the book actually *was* saved to disk.
Comment 2 Andreas Eibach 2015-03-13 12:29:56 UTC
to initial comment:
I second that. Currently it's extremely important to always closely watch the TITLE BAR of the window whether there is an asterisk (*) showing that the file was modified.
Or simply hit CTRL-S continuously. I know how it feels if you have modified a lot and the last saved version only happened 2 steps after the initial version, losing all changes...
Comment 3 Geert Janssens 2015-12-04 19:14:55 UTC
(In reply to isaac.accounts from comment #0)
> There is no warning if you quit GnuCash but have not saved a new book/file.
> 
> This caused me to loose 2 hours of work setting up my accounts.

I'm sorry to hear about that.

> Unlike most
> money management software, GnuCash also does not apparently create an
> initial book for you.

It does. When you start for the first time it will present you with an Account Hierarchy assistant. That is the way to get your initial book created.

> 
> However the save command was disabled, which lead me to believe that a file
> was in fact created and had been automatically saved. Traditionally, a
> program should leave the Save command enabled and redirect the request to
> the Save As command. This removes the ambiguity of the Save command being
> disabled.

If you skip the Account Hierarchy Assistant, you are presented with an empty book and indeed there the save button is disabled. Making changes at this point won't enable the Save button indeed, which is - I suppose - the way you ended up loosing your data.

While I confirm the bug, I do wonder why you skipped the Account Hierarchy Assistant in the first place. Personally I think it should be made unskippable because it sets some crucial information like the book's default currency.
Comment 4 Geert Janssens 2015-12-10 17:58:24 UTC
I have committed some changes that should at least solve the unwanted data loss if starting a new file without using the hierarchy assistant.

It think this is sufficient for now, although a more thourough evaluation of our startup code would be good. I still think it would be safer if the account hierarchy assistant can't be skipped, and probably we'd want some kind of a nice landing page when no file is selected. Something that gives the user several options like
- starting a new file (which would trigger the hierarchy assistant, cancelling would return to the landing page)
- open an existing file
- re-open a recently opened file
- quit

That's too much for the stable branch though.
Comment 5 Geert Janssens 2015-12-10 18:03:21 UTC
The "landing page" idea is the topic of bug 609183 btw...
Comment 6 John Ralls 2018-06-29 23:38:48 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=745101. Please update any external references or bookmarks.