Bug 472392

Summary: Cannot import more than one ISO 20022 XML
Product: [Applications] skrooge Reporter: Matija Šuklje <matija>
Component: generalAssignee: Stephane MANKOWSKI <stephane>
Status: RESOLVED FIXED    
Severity: normal CC: stephane
Priority: NOR    
Version: 2.29.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Matija Šuklje 2023-07-19 10:38:04 UTC
SUMMARY

When importing more than one ISO 20022 XML file, it fails to import every file after the first one.

STEPS TO REPRODUCE

1. have several ISO 20022 XML files (e.g. from your bank)
2. import the first one through File ↦ Import ↦ Import…
3. import another one using the same way

OBSERVED RESULT

The second (and any later) import fails with the following error message:

[ERR-5]: Import of file named 'file:///home/hook/Prejemi/1_6_10.xml' failed
[ERR-5]: Creation failed. The object already exists.
[ERR-10019]: UNIQUE constraint failed: unit.t_symbol Unable to fetch row
[ERR-10019]: INSERT INTO unit ('t_type','t_name','t_symbol') VALUES ('C','','')

EXPECTED RESULT

It should not fail, but import the transactions :)

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION

Might(?) be related to https://bugs.kde.org/show_bug.cgi?id=472390
Comment 1 Matija Šuklje 2023-07-19 10:38:53 UTC
Skrooge version: 2.30.0
Comment 2 Stephane MANKOWSKI 2023-07-19 12:17:30 UTC
Hi,

I'm not able to reproduce.
Could you provide me a scenario with 2 sample files (anonymized) to reproduce the issue ?
Comment 3 Matija Šuklje 2023-07-19 14:06:27 UTC
I will send you an example by e-mail. Thank you for looking into it.
Comment 4 Stephane MANKOWSKI 2023-07-21 16:06:46 UTC
Issue reproduced
Comment 5 Stephane MANKOWSKI 2023-07-21 17:17:21 UTC
Git commit 2ebe17f00f735a03f134a693ea2fc2d2aa52520d by Stephane MANKOWSKI.
Committed on 21/07/2023 at 17:16.
Pushed by smankowski into branch 'master'.

Cannot import more than one ISO 20022 XML

M  +5    -0    CHANGELOG
M  +4    -4    plugins/import/skrooge_import_xml/ISO20022.xslt

https://invent.kde.org/office/skrooge/-/commit/2ebe17f00f735a03f134a693ea2fc2d2aa52520d
Comment 6 Matija Šuklje 2023-08-18 14:38:12 UTC
Is there an ETA when this patch will be released in 2.31.0 or 2.30.1?
Comment 7 Stephane MANKOWSKI 2023-08-18 19:33:50 UTC
(In reply to Matija Šuklje from comment #6)
> Is there an ETA when this patch will be released in 2.31.0 or 2.30.1?

Hi,

I just published a new beta version 2.30.1 containing this fix.
More information here:
https://launchpad.net/~s-mankowski/+archive/ubuntu/beta-kf5
https://skrooge.org/download/