Bug 335804

Summary: Default Save As filename & location Incorrect
Product: [Applications] kmymoney Reporter: JAH <vanquestor>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: agander93, ostroffjh
Priority: NOR    
Version: 4.6.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Settings for the autobackup feature

Description JAH 2014-06-04 19:42:30 UTC
I use KmyMoney (which is brilliant) for several different sets of accounts, each stored in their own location.
When saving, I use "Save As" to create a new file (leaving the old one as a backup) but the  file name and location proffered in the Save As dialog box are those from the last time I used "Save As" not those of the file I opened and am working on. As a result it is very easy to carelessly overwrite another set of accounts with the current  data set.

Reproducible: Always

Steps to Reproduce:
1. Open "Co1" set of accounts from location "A" then "save As"  & close 
2. Open "Co2" set of accounts from location "B" then choose "Save As"
3. The proffered file name and location will be those of "Co1" in location "A" not "Co2" in location "B" which are the accounts you've been working on. Making it easy to carelessly overwrite Co1 accounts with Co2 data


Expected Results:  
When using "Save As" the default proffered file name and location should be the same as those used to open the current data set.
Comment 1 Jack 2014-06-04 19:53:39 UTC
I'll let the developers address the underlying issue, but as an alternate approach, you might consider using the File/Backup menu selection.  It saves with the same file name with the date appended, so even if they get mixed in the same directory, you can still tell them apart.
Comment 2 JAH 2014-06-04 20:18:04 UTC
Thanks for the suggestion but I prefer to keep my separate accounts in separate folders so Save As works best for housekeeping and the Backup facility is, I think,  Date specific - not Date & Time  specific so multiple backups within a day overwrite each other. Sometimes if transactions get complex I like to "save as" I go so I always have a fall back. I  appreciate the reply though, thanks.
Comment 3 Thomas Baumgart 2014-06-05 11:20:40 UTC
That is what the auto-backup feature is for (see attached screenshot). Not sure if it is available in the version you use or part of the current development. We should still inspect the save as behavior.
Comment 4 Thomas Baumgart 2014-06-05 11:21:30 UTC
Created attachment 87023 [details]
Settings for the autobackup feature
Comment 5 JAH 2014-06-05 11:32:11 UTC
I appreciate the feedback but would point out  that a backup feature that is not date & time specific is always prone to overwrite the previous data whereas "Save As" allows simple filename amendment to provide a roll-back position. Perhaps I am overly cautious about my data  but I believe "Save As" has a very valid function and at the moment it seems to me to be in danger of defeating its own purpose.
Comment 6 allan 2014-06-05 11:58:35 UTC
I think that "Save As"  uses the last save setting rather than the current read setting.

In this same area, possibly, and not always, I sometimes find that Recent Files does not always include the most recent.
Comment 7 Thomas Baumgart 2014-06-05 12:02:38 UTC
JAH, I do understand your concern, but the autobackup feature does exactly that without additional user intervention. 

The feature takes care of .1~ always being the youngest and .5~ always being the oldest backup you have by renaming them when a new backup is created. This happens whenever you save the data file. At the same time, the oldest backup is removed. This ensures that no data is overwritten at any time.

Here's a directory listing of my data file and the existing backups while my setting of the number of backups is 5.

-rw-r--r-- 1 thb users 411812 2014-05-12 17:58 thb.kmy.5~
-rw-r--r-- 1 thb users 412239 2014-05-12 17:59 thb.kmy.4~
-rw-r--r-- 1 thb users 412218 2014-05-19 07:40 thb.kmy.3~
-rw-r--r-- 1 thb users 413319 2014-05-19 07:41 thb.kmy.2~
-rw-r--r-- 1 thb users 413344 2014-05-20 20:40 thb.kmy.1~
-rw-r--r-- 1 thb users 413677 2014-05-20 20:40 thb.kmy

As I mentioned, we still need to take a look into the "Save as..." problem you have mentioned.
Comment 8 JAH 2020-03-05 19:05:12 UTC
Forgot I filed this a long time ago and the conversation below got off topic but the problem was restated and fixed in bug 403608

*** This bug has been marked as a duplicate of bug 403608 ***