maybe-finance / maybe

The OS for your personal finances
https://maybe.co
GNU Affero General Public License v3.0
28.8k stars 2.19k forks source link

Improvement: Allow user to configure date and amount format during transaction imports #863

Open zachgoll opened 1 month ago

zachgoll commented 1 month ago

Is this issue related to a problem? Please describe.

Currently, the transaction imports feature requires users to input their data with the following convention:

Many users will be using the following flow to import data:

  1. Go to bank login
  2. Export transactions from bank
  3. Import file to Maybe

Most bank exports will include a "date" and "amount" field, but they will all be in different formats.

The user should be able to tell Maybe what those formats are to prevent an extra step of cleaning their exported bank data prior to importing it to Maybe

Describe the work that needs to be done to address this issue

Designs for this issue

https://www.figma.com/design/lonJmVk3HYkwZoIO7xYP2w/Maybe-App-(Community)?node-id=4199-214&t=dtAjwPnms0o6BmNx-0

MagnusHJensen commented 2 weeks ago

Is this relevant if the user can set their date preference in the config issue: #909 , or should it still be provided here, but just set to the default of the user selected value, in case the format is different from the user's preferred option?

Could you also elaborate a bit on the amount field?

Note: Just stumbled upon this app and repo, and it looks cool. Hoping to engage with it over the coming weeks, cheers

zachgoll commented 2 weeks ago

@MagnusHJensen yep, I think defaulting this select option to the user's preferred date format as specified in #909 is a good approach.

In regards to the amount field, in most cases, a CSV will display "incomes" as a positive value and "expenses" as a negative value, but we cannot guarantee that. Since this app relies on the signage of the amount to calculate various metrics, we need to ensure that we know exactly what convention the user is using while importing.

MagnusHJensen commented 2 weeks ago

@zachgoll Alright, that makes sense. So amount would technically be only two options. One for (-) = positive amounts and (+) = negative amounts. And One for (+) = positive amounts and (-) = negative amounts?

mamarguerat commented 2 weeks ago

@MagnusHJensen I would add an option. I had once a csv table with all amounts in negative (don't ask why not positive) and another column with the label "income" and "expense". I don't know if any bank does the same, this csv export was from Firefly-III.

MagnusHJensen commented 2 weeks ago

@MagnusHJensen I would add an option. I had once a csv table with all amounts in negative (don't ask why not positive) and another column with the label "income" and "expense". I don't know if any bank does the same, this csv export was from Firefly-III.

Interesting setup haha.

Then it comes down to how many custom/third-party solutions should be supported, and I can't advocate for anything there, since it's out of my scope/knowledge.

zachgoll commented 2 weeks ago

@mamarguerat that's a great point, I've seen this format for a couple of my FIs too.

To support that, I'm guessing we'd need an additional select where we ask the user the name of the column that designates the signage the transaction. For example, Mint data exports are in the following format:

image

So in this case, we'd need the user to select "Transaction Type" from the column list.

@justinfar this might affect the existing designs a little bit, but probably would be worth throwing in?

mamarguerat commented 2 weeks ago

Thinking of UX, if there is a transaction type column, it would be great to have some other selects, which are populated with uniques values of the column, to choose what is an income or an outcome. The transaction type column could be "debit/credit", "income/outcome", "deposit/withdrawal", (maybe some other, I don't have enough English vocabulary for that) and in multiple languages. So letting the user choose the value is, by my point of view, a must-have.

Thinking of something like that (done in html with dev tools), where the two last select are only shown when something is selected in "Transaction type" image

zachgoll commented 1 week ago

@mamarguerat here are some updated designs from @justinfar that I think will work for this issue!

CleanShot 2024-07-08 at 09 30 45@2x

https://www.figma.com/design/lonJmVk3HYkwZoIO7xYP2w/Maybe-App-(Community)?node-id=4199-214&t=dtAjwPnms0o6BmNx-0

jestinjoshi commented 1 day ago

My bank gives me a CSV in the following format

Image

If you could take this into consideration then that would be great