Bug 498416 - File information tag is not updated correctly
Summary: File information tag is not updated correctly
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: git (master)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on: 498419
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-09 08:59 UTC by Ralf Habacker
Modified: 2025-01-18 17:43 UTC (History)
0 users

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


Attachments
test file (13.36 KB, text/xml)
2025-01-09 08:59 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2025-01-09 08:59:52 UTC
Created attachment 177222 [details]
test file

SUMMARY
KMyMoney supports a possibility to correct special errors in a KMyMoney file during loading. The “id” attribute of the KMYMONEY-FILE:FILEINFO:FIXVERSION xml tag is used for this purpose. Due to a programming error, this value is not generated, which means that the status of the file cannot be determined and possible corrections are not carried out.

STEPS FOR REPRODUCTION
1. open the attached test file
2. check the xml tag KMYMONEY-FILE:FILEINFO:FIXVERSION

OBSERVED RESULT
The tag mentioned contains a date attribute

    <FIXVERSION date=“5”/>

but in the source code, “id” is expected to be present

EXPECTED RESULT
The mentioned tag should contain an id attribute instead as shown below

 <FIXVERSION id=“5”/>

SOFTWARE/OS-VERSIONS
Operating System: openSUSE Leap 15.6
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Comment 1 Ralf Habacker 2025-01-18 17:43:49 UTC
Git commit 3b20828adcf70f1e5f46c4024b6d56e7ff0761fa by Ralf Habacker.
Committed on 18/01/2025 at 17:17.
Pushed by habacker into branch 'master'.

Fix bug not writing the fix version id attribute for xml output

Instead of writing the ‘id’ attribute, which is checked when
the file is read, the ‘date’ attribute was written without
content.
FIXED-IN:5.2

M  +1    -2    kmymoney/plugins/xml/mymoneyxmlwriter.cpp

https://invent.kde.org/office/kmymoney/-/commit/3b20828adcf70f1e5f46c4024b6d56e7ff0761fa