Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nordigen Transfer Support #8529

Closed
3 tasks done
jnsflschr opened this issue Feb 7, 2024 · 6 comments
Closed
3 tasks done

Nordigen Transfer Support #8529

jnsflschr opened this issue Feb 7, 2024 · 6 comments

Comments

@jnsflschr
Copy link

Support guidelines

Description

Hi there,

Support of transfers between spaces at N26 with Nordigen Import is currently missing. Problem is that not all Spaces have IBANs. So every Transaction between Spaces without IBAN is detected as a normal transaction to an unknown account. Similar to #6604 and #5675 and the current Beta Tasks

Solution

Point is that they could be detected through the additionalInformation property. Both Transactions (deposit and withdraw) of a transfer have the same additionalInformation, unsigned amount and date.
I've been working on this for the last few days. The following Questions occurred

  • Should both transactions be transformed to transfers or only one? Or should a new one be created?
  • Some information gets lost when transactions are "merged" (for example external_id). How can it be preserved? External_id as array for transactions?
  • Firefly accounts with no IBAN and account number won't get pushed into the targetAccount array. How can this be supported?

What are alternatives?

  • manually edit or delete every transfer transaction

Additional context

No response

@JC5
Copy link
Member

JC5 commented Feb 7, 2024

Sorry, are you asking me this because you expect me to merge your solution into the data importer?

@JC5
Copy link
Member

JC5 commented Feb 7, 2024

The reason I ask (for I sound a little mean).

  • You're asking for two things I can't solve: external_id's as arrays and transactions with no account data in the targetAccount array.
  • deleting and filtering transactions based on undocumented features in a text-field is not something I'm going to introduce to the data importer. I've had a hell of a time in the past trying to maintain custom solutions based on these kinds of things and I'm not going back.

So I have no problem offering help where you need it, but it'll have to result in something you or other users can run independently of the data importer.

@jnsflschr
Copy link
Author

jnsflschr commented Feb 7, 2024

That is what I wanted to know. There are a lot of approaches to solve a problem. I don't know which parts of the code shouldn't be touched and which can. As you said in #5675:

Adding buttons to magically merge some transactions isn't the solution. I think the solution has to be part of the data importer, but I'm not sure what it can be.

I have developed a solution that works for me and it is part of the data importer but it is probably not the best it could be. Currently it is part of the appendAccountFields function of the GenerateTransactions.php and looks something like this:

       if ('' == (string)$iban && '' == (string)$name && $number == sprintf(self::NUMBER_FORMAT, '')) {
            app('log')->debug('No IBAN, number and name found.');
            $inverseEntryAccountId = $this->getInverseTransactionAccount($this->initialTransactions, $entry);
            if ($inverseEntryAccountId) {
                app('log')->debug('Found a matching transaction.');
                // $iban = $this->nordigenAccountInfo[$inverseEntryAccountId]['iban'];
                // $number = sprintf(self::NUMBER_FORMAT, (int)$this->accounts[$inverseEntryAccountId]);
                // $name = $this->nordigenAccountInfo[$inverseEntryAccountId]['name'];

                $transaction[$idKey] = (int)$this->accounts[$inverseEntryAccountId];
                $transaction['type'] = 'transfer';
            }
        }

What would you suggest to solve the general problem in a more elegant way?

@JC5
Copy link
Member

JC5 commented Feb 8, 2024

I've yet to find an elegant way.

Right now, I'm inclined to do something akin to Wordpress' service hooks where you can create a method that hooks into specific points in the data importer. You get the relevant data, you give a response, and the data importer takes it from there. That requires some kind of a plugin system however, and the learning curve for those is very steep.

That does absolve me of this problem however.

But perhaps a magic button in Firefly III is what's needed.

@jnsflschr
Copy link
Author

That sounds like a lot of work but in the end it opens a lot of space to solve problems like mine. I will look forward to this and close this issue for now ;)

Copy link
Contributor

Hi there! This is an automatic reply. Share and enjoy

This issue is now 🔒 closed. Please be aware that closed issues are not monitored by the developer of Firefly III.

  • If the original bug is not actually fixed, please open a new issue. Refer to this issue for clarity.
  • Follow-up questions must be posted in a new discussion
  • Further replies to this issue may get no response.

If there is more to discuss, please open a new issue or discussion.

Thank you for your contributions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants