Bug 447224 - Import Filter creates output file but does not import it. Manually importing created file works fine.
Summary: Import Filter creates output file but does not import it. Manually importing ...
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.1.2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-19 11:27 UTC by AgentX_NZ
Modified: 2021-12-19 11:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Powershell script before being compiled. (364 bytes, text/plain)
2021-12-19 11:27 UTC, AgentX_NZ
Details
Powershell script as an executable (25.50 KB, application/x-msdownload)
2021-12-19 11:30 UTC, AgentX_NZ
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AgentX_NZ 2021-12-19 11:27:46 UTC
Created attachment 144674 [details]
Powershell script before being compiled.

SUMMARY
***
When importing banks OFX file, it causes kMyMoney to close. To difficult to diagnose so chose to import QIF format instead. Unfortunately banks qif has Payees as Memos so an import filter was required to change M to P. 

Initially thought Import Filter parsed the file as an argument to the filter application but learnt the contents were actually piped in.  Being on Windows platform prefer to use Powershell and compile to executable. 
Script tests fine and works in KMM, KMM waits for script to finish however no transactions are imported on completion.
The stdin is receiveived, processed and saved to output file. KMM is not picking up the file after the filter.

I read the documentation multiple times and tried the source code but it was above my head. 
I also tried writing to stdout instead of a file. No file and still no transaction.
What is KMM expecting if not the file created in the import filter?

***
STEPS TO REPRODUCE
1. Create powershell app to receive stdin and output new file
   Compile script to exe. (used PS2EXE)
3. Create Filter Profile
   Set "Input filter location" to path/myFilter.exe
   Set "Output filter location to same path and file outputted by powershell script
5. File >> Import QIF using created filter profile.

OBSERVED RESULT
Import filter invoked, qif contents pushed to executable, output.qif file created with corrections applied
Import waits for executable to finish then reports No transactions imported.
"Output.qif" file remains intact and can be manually imported without issue.

EXPECTED RESULT
After selecting qif file to import, expect script to write to stdout or file and for KMM to import the newly created file.

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 AgentX_NZ 2021-12-19 11:30:21 UTC
Created attachment 144675 [details]
Powershell script as an executable