codinguser / gnucash-android

Gnucash for Android mobile companion application.
Apache License 2.0
1.23k stars 539 forks source link

Auto-complete for accounts #110

Open aperomsik opened 11 years ago

aperomsik commented 11 years ago

I imported my account structure. I have way too many accounts in my desktop GNUcash file for selection from list to be practical. In desktop GNUcash I can usually type one or two characters and quickly find the account I am looking for.

codinguser commented 11 years ago

There is no place in tha app where account names have to be entered. So I assume you mean a feature to search accounts right?

aperomsik commented 11 years ago

Mainly I was referring to the account selector labelled "transfer account" but the same would apply to anywhere an account can be selected from a list -- a nearby search icon that would swap out the list for a text entry field with auto-complete could be useful. I expect it to be much faster to search for an account by typing the first few characters of its name rather than scrolling through all other accounts until I find the one I want.

codinguser commented 11 years ago

Ok I now understand what you mean

johngray1965 commented 10 years ago

Before this project, I worked on another gnucash android project (https://code.google.com/p/gnc4a/) that's now collecting dust. It had some nice things related to this. Namely you could start to type a description, it would auto-complete it from other transactions, and if you select one it would default the rest of the fields to the values from the last transaction with the same description (I was the implementer of that feature, but don't judge me on the code, that was one of the first Android projects I ever worked on, things have come along way since).

I also imported all of my accounts, and it takes way too many clicks to for me to add a transaction.

I envision a quick add widget (as in a widget on one of home screens), where I just type a first 3 letters of a description, say "who" it finds Whole Foods, and fills that in, and sees that last transaction with that description did a debit to my visa account, and a credit to expenses:groceries (or something that that effect). It fills all that it. I enter the amount, and add the transaction. Very few clicks.

johngray1965 commented 10 years ago

I see now that there's a widget that allows me to to display an account balance, and it has an add button that takes me to adding a transaction to that account. And that we can't do text input on the widget any way. So now I'm back to agreeing with the OP. But it appears to be auto-completing now. Should this be closed?

codinguser commented 10 years ago

There is autocomplete in the app which pre-fills all the fields except the amount, as you mentioned. However in a case where the user is entering a completely new transaction not based on a template, then the OPs issue becomes relevant. You have to pick the transfer account from a list. This was really difficult before (I think at the time of the posting) because account names were not hierarchically sorted. But now they are which makes it easier to find the one you want. So I will probably close this issue

aperomsik commented 10 years ago

Sorting isn't enough. If there are dozens of accounts, auto-complete will be faster than scrolling through the list.

codinguser commented 10 years ago

That is true. But it is not a top priority for now, especially as it is not trivial to implement.

alensiljak commented 7 years ago

Well, as the feature was not outright rejected and neither was it implemented, it is probably not right to close this issue. I also find it a major issue to scroll down through dozens of categories. Even worse, this is also a problem with desktop GnuCash. If I'm adding expense and looking for Music, I don't really want to think if it is under Entertainment or Recreation, or somewhere else. It would be really convenient to just type a few letters (even better - sequential but not directly one after another) and filter only the expense accounts (categories) that match the search criteria.

I agree that there is no space to do this on the current New Transaction screen but it would be fairly easy to implement using a separate activity, whose only purpose would be to filter and select an account. This would be reusable. This is how I've implemented it in MMEX and find it quite handy. As I was just adding a split transaction for supermarket shopping, I had to scroll up and down the huge list several times just to find the appropriate categories/accounts. Really, I find this to be a major issue with both versions of GnuCash. Who can spend several minutes entering just one fairly simple transaction?

codinguser commented 7 years ago

@MisterY you're right. This should probably stay open because it was not quite rejected, just low priority. The way I envision it, it would best be through subclassing AutocompleteTextBox to create something which searches as we want, suggests accounts as we want and also only accepts full account names. I would rather not have a separate view for picking account. That only adds the friction for entering transactions.

About the speed of entering transactions, most people have similar costs throughout the week. It is possible to start typing the description and auto-fill the rest of the transaction.

That means the autocomplete of accounts would be great to have, but not a priority with the limited resources we have. I will however re-open this issue.

alensiljak commented 7 years ago

I actually started some work on this, however slow. Do you mind checking Money Manager Ex for Android and let me know if picking up the account/category is too distracting? I find it quite convenient but would appreciate any comments before dedicating more time to this issue.

I find that having a separate activity provides a lot of freedom in terms of functionality that can be encapsulated in it and allows for some nice search interface, filtering, creation of new accounts, editing of existing accounts, etc. This is my experience, at least.

most people have similar costs throughout the week. It is possible to start typing the description and auto-fill the rest of the transaction.

Thanks for the tip. I did not realize that there is an autofill. This is indeed very useful for regular transactions. But it also means that facing a new situation, like traveling to a foreign country, becomes painful as new accounts for expenses in the foreign currency have to be created before registering the expense. It is also a bit difficult to reuse existing payees, like "water" as the new account/category has still to be found by scrolling and so on. You get the idea.

Perhaps it might be enough, as you suggested, to use AutoCompleteTextView and have the adapter display all the accounts that contain the search text. For example, if I'm typing in "music", I'd like to see all the accounts that contain Music at any level (i.e. Hobbies:Music, which is for instruments, and Entertainment:Music, which is for concerts or albums, for example).

alensiljak commented 7 years ago

Unfortunately, the auto-fill does not very useful for my usage scenario. I tend to empty the database about once a month (and these days even more frequently as I'm testing various scenarios) and, every time I do that, the auto-fill needs to learn the transactions again. Perhaps this is because I export the accounts into the new file (finally started the migration so the structure keeps changing) so the memorized transactions are lost. In any case, being able to type a few letters would help immensely. I've created a couple of Python scripts for desktop. One of them does exactly this. :)) While migrating the data to GnuCash, I need to find specific accounts and adjust the transactions import via .qif. The search for full account name really helps.