Bug 421757 - Anonymised files are no longer created
Summary: Anonymised files are no longer created
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-19 07:56 UTC by Ian Neal
Modified: 2020-06-05 04:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0
Sentry Crash Report:


Attachments
Anonymised file created on 5.0.6 (1.10 KB, application/x-kmymoney)
2020-05-19 09:13 UTC, Ian Neal
Details
Anonymised file created on git master (1.13 KB, application/x-kmymoney)
2020-05-19 09:18 UTC, Ian Neal
Details
Anonymized KMM file (3.50 KB, text/xml)
2020-05-19 09:23 UTC, Robert Szczesiak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Neal 2020-05-19 07:56:14 UTC
SUMMARY
When trying to create an anonymous file, it doesn't

STEPS TO REPRODUCE
1. Create a test kmy file and add some accounts / data
2. Save As and select Anonymous file
3. Open newly created anonymous file

OBSERVED RESULT
1. File name is "xyz.onymous files (*.anon.xml).kmy" - xyz is the name I asked to call it
2. File contents are not anonymised

EXPECTED RESULT
1. File name is "xyz"
2. Contents are anonymised

SOFTWARE/OS VERSIONS
Windows: n/a
macOS: n/a
Linux/KDE Plasma: latest git master on Fedora 30
(available in About System)
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.5

ADDITIONAL INFORMATION
Comment 1 Ian Neal 2020-05-19 09:13:04 UTC
Created attachment 128608 [details]
Anonymised file created on 5.0.6

This is a test file saved anonymised, only has two accounts (Account 1 and Account 2) plus one monthly transfer (Transfer 1) and one payee (Regular)
Comment 2 Ian Neal 2020-05-19 09:18:48 UTC
Created attachment 128609 [details]
Anonymised file created on git master

This only has two accounts (Check account and Savings), one scheduled transfer (Transfer 1) and one payee (Test Transfer)
Comment 3 Robert Szczesiak 2020-05-19 09:22:24 UTC
This is what I did:
1. Open the attached test file.
2. Select File -> Save as...and choose XML format with no encryption.
3. Input file name: xyz and select Filter: Anonymous files. 
4. Click Save.

Result:
File named "xyz.anon.xml" (please find attached).
Seems good to me.

SOFTWARE/OS VERSIONS
Manjaro Linux
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

branch: master
Comment 4 Robert Szczesiak 2020-05-19 09:23:17 UTC
Created attachment 128610 [details]
Anonymized KMM file
Comment 5 Ian Neal 2020-05-19 09:31:21 UTC
(In reply to Robert Szczesiak from comment #3)
> This is what I did:
> 1. Open the attached test file.
> 2. Select File -> Save as...and choose XML format with no encryption.
> 3. Input file name: xyz and select Filter: Anonymous files. 
> 4. Click Save.
> 
> Result:
> File named "xyz.anon.xml" (please find attached).
> Seems good to me.
> 
> SOFTWARE/OS VERSIONS
> Manjaro Linux
> KDE Plasma Version: 5.18.4
> KDE Frameworks Version: 5.69.0
> Qt Version: 5.14.2
> 
> branch: master

Those are the same steps I am following, for whatever reason, selecting the Anonymous file filter is not adding the .anon.xml extension to the filename.
If I manually add it on my 5.0.6 install then it creates an anonymised version
Comment 6 Ian Neal 2020-05-19 09:33:12 UTC
With git master, manually typing example.anon.xml also works.
Comment 7 Thomas Baumgart 2020-05-19 15:24:17 UTC
Git commit 5f7b325274c0535b68aca58819273e13e6a8d2b5 by Thomas Baumgart.
Committed on 19/05/2020 at 15:23.
Pushed by tbaumgart into branch 'fix-421757'.

Fix setup of default file extension in Save as dialog

The default file extension was not setup correctly in all circumstances.
This change makes sure to extract the filetype from all known formats.
FIXED-IN: 5.0.9

M  +17   -1    kmymoney/plugins/xml/xmlstorage.cpp

https://invent.kde.org/office/kmymoney/commit/5f7b325274c0535b68aca58819273e13e6a8d2b5
Comment 8 Thomas Baumgart 2020-05-19 20:06:54 UTC
Git commit cc39e19fe91d7c118b0ce9d7e7b57d5c6e806c6f by Thomas Baumgart.
Committed on 19/05/2020 at 20:04.
Pushed by tbaumgart into branch '5.0'.

Fix setup of default file extension in Save as dialog

The default file extension was not setup correctly in all circumstances.
This change makes sure to extract the filetype from all known formats.
FIXED-IN: 5.0.9
(cherry picked from commit 5f7b325274c0535b68aca58819273e13e6a8d2b5)

M  +17   -1    kmymoney/plugins/xml/xmlstorage.cpp

https://invent.kde.org/office/kmymoney/commit/cc39e19fe91d7c118b0ce9d7e7b57d5c6e806c6f