paukiatwee/budgetapp

Import CSV Feature

Porter opened this issue · 10 comments

Hi,

I like this app and the benefits it gives a loose-with-money college student such as myself. One of the biggest problems I have with it that the the data entry is tedious. A feature to import a CSV file would really solve this issue and make using this app a much more low-maintenance experience.

Here's what I envision

An Import tab on the left side bar.
The import page accepts a CSV file, parses it on the front end, and displays it as a table.
In the table head are select tags where the user can assign each column of the CSV as either

  • Amount
  • Remark
  • Transaction Date

After the user confirms what column of the CSV maps to what value, the values are displayed in a table.
The items in the table are editable, and the user can specify which budget each transaction falls under.

Once all is in order, the user can submit all these transactions to the server.

Some possible issues

  • The transaction might have a month in which no budgets exist
  • (My) banks report transaction amounts as positive for gain and negative for loss. This could be an issue when the user categorizes a negative value as a purchase, as the app interprets positive values (in expenditures) as money spent.
  • The browser might not be able to handle parsing and displaying very large CSV files
  • If the CSV is of all transactions, importing a CSV now and in a month would cause duplicate transactions for those older than one month.

I've already begun work on this feature, is this a PR you would consider accepting?

Thank you for your time,
Porter

The ability to import a CSV already exists. I don't know if it has the same workflow as you've envisioned but there's an option to import CSV's.

I misspoke. Thinking of a different application.

Really? I didn't see it. And in TransactionResource.java there's only one post method for adding a single transaction.

Where can I upload a CSV? And where is the code for handling it?

So to clarify, a PR with this feature would be welcome?

@Porter Great idea and as you said, import csv it self is complicated and of course, PR is welcome.

#16

@paukiatwee Here is the back end PR for accepting multiple transactions in one request.

Front end coming soon

#17

@paukiatwee And here is the front end. I separated them because they are both pretty big.

Cheers,
Porter

@paukiatwee

Is this something you can review?

@Porter I did reviewed. Please check comments.

@paukiatwee I don't see any comments on either PR. Are you sure they're there?

@Porter I merged PRs