Bug 432826

Summary: GREP(payee name from bank) and replace it with a predefined name
Product: [Applications] kmymoney Reporter: Joachim Vobis <yardtree>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED WORKSFORME    
Severity: wishlist    
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: attachment-31449-0.html

Description Joachim Vobis 2021-02-12 01:26:59 UTC
Please add an important time-saver that has been part of Quicken, MSMoney, AceMoney and other personal finance software for many years.

KMyMoney downloads payee names from checking and credit card accounts including all the extra crap that the stores or banks include. Examples:

   WAL-MART #2002           GILROY
   MCDONALDS F3707         FOSTER C
   POS Transaction SQ CAFE DES CROI

Here the payee names includes the store numbers, sometimes their locations, sometimes transaction type (e.g., "POS"), sometimes something else. 

Please add a rule to the OFX importer that uses a list of replacements:

   IF PAYEE CONTAINS <user defined regular expression>
   THEN REPLACE PAYEE WITH <user defined name>
   AND USE CATEGORY <optional>

This is how I'd use it:

   IF PAYEE IS "*WAL-MART*"
   THEN REPLACE PAYEE WITH "Wal-Mart"
   AND USE CATEGORY "" 
       (here I leave the category empty because I want to enter it later, 
        e.g., clothes or groceries or tools)

   IF PAYEE IS "*MCDONALDS*"
   THEN REPLACE PAYEE WITH "McDonalds"
   AND USE CATEGORY "Leisure:FastFood"

   IF PAYEE IS "*CAFE DES CROI*"
   THEN REPLACE PAYEE WITH "Cafe Des Croissants"
   AND USE CATEGORY "Leisure:Dining"

Basically I want that the OFX importer uses a table that has the regular expressions in the first column, the replacement text for the payee in the second, and optionally the desired category in the third.

Thank you in advance!
Comment 1 Jack 2021-02-12 02:38:46 UTC
While not completely what you want, you can get most of it with existing functionality.  Using payee matching, you can match on any consistent substring.  (In fact, your examples of "*NAME*" are not regular expressions, which would be ".*NAME.*".)  You can also set a default category for new transactions for each payee.  You can match on NAME, for example, and it just needs to exist anywhere in the field you have chosen to match for the Payee.  Matching and selecting a default Category are available in the Payee view.

Please see if these will work for you, and if not, please provide a more specific example of what else you want it to do.
Comment 2 Joachim Vobis 2021-02-20 18:51:17 UTC
Created attachment 135984 [details]
attachment-31449-0.html

Hello Jack, 

Your email was very helpful. It took me a while to figure out how
matching works (the KMyMoney user guide is  short on this topic). Time
will tell but for now this feature seems to do what I need. 

Thank you very much, 

Joachim 

PS: I am relatively new to Linux (switched from Windows 7 to Mint). I
really appreciate all advice. 

On 2021-02-11 18:38, Jack wrote:

> https://bugs.kde.org/show_bug.cgi?id=432826
> 
> Jack <ostroffjh@users.sourceforge.net> changed:
> 
> What    |Removed                     |Added
> ----------------------------------------------------------------------------
> Status|REPORTED                    |NEEDSINFO
> Resolution|---                         |WAITINGFORINFO
> 
> --- Comment #1 from Jack <ostroffjh@users.sourceforge.net> ---
> While not completely what you want, you can get most of it with existing
> functionality.  Using payee matching, you can match on any consistent
> substring.  (In fact, your examples of "*NAME*" are not regular expressions,
> which would be ".*NAME.*".)  You can also set a default category for new
> transactions for each payee.  You can match on NAME, for example, and it just
> needs to exist anywhere in the field you have chosen to match for the Payee. 
> Matching and selecting a default Category are available in the Payee view.
> 
> Please see if these will work for you, and if not, please provide a more
> specific example of what else you want it to do.
Comment 3 jmadero 2021-02-20 19:44:19 UTC
Sometimes new users are in the best position to modify documentation to
make it easier for everyone else. If you have the time and want to have
a go at it, Linux is all about the community, it takes a village.

On 2/20/21 10:51 AM, Joachim Vobis wrote:
> https://bugs.kde.org/show_bug.cgi?id=432826
>
> --- Comment #2 from Joachim Vobis <yardtree@sonic.net> ---
> Hello Jack,
>
> Your email was very helpful. It took me a while to figure out how
> matching works (the KMyMoney user guide is  short on this topic). Time
> will tell but for now this feature seems to do what I need.
>
> Thank you very much,
>
> Joachim
>
> PS: I am relatively new to Linux (switched from Windows 7 to Mint). I
> really appreciate all advice.
>
> On 2021-02-11 18:38, Jack wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=432826
>>
>> Jack <ostroffjh@users.sourceforge.net> changed:
>>
>> What    |Removed                     |Added
>> ----------------------------------------------------------------------------
>> Status|REPORTED                    |NEEDSINFO
>> Resolution|---                         |WAITINGFORINFO
>>
>> --- Comment #1 from Jack <ostroffjh@users.sourceforge.net> ---
>> While not completely what you want, you can get most of it with existing
>> functionality.  Using payee matching, you can match on any consistent
>> substring.  (In fact, your examples of "*NAME*" are not regular expressions,
>> which would be ".*NAME.*".)  You can also set a default category for new
>> transactions for each payee.  You can match on NAME, for example, and it just
>> needs to exist anywhere in the field you have chosen to match for the Payee.
>> Matching and selecting a default Category are available in the Payee view.
>>
>> Please see if these will work for you, and if not, please provide a more
>> specific example of what else you want it to do.
Comment 4 Jack 2021-02-20 20:12:57 UTC
Along those lines, I'm also willing to take concrete suggestions for improving the documentation if you don't want to deal with formatting docbook source files.

Also, unless there is really a wishlist request to alter how matching is one, I'm going to close this ticket as WORKSFORME.

(Please note that when you reply by email, your ENTIRE message becomes the next comment in the bug.  It is usually best to remove everything from your message except perhaps a specific item which you are commenting on.)
Comment 5 Bug Janitor Service 2021-03-07 04:33:25 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2021-03-22 04:33:44 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!