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

Enable match on all transaction fields #28

Closed
Kraymer opened this issue Oct 4, 2015 · 2 comments
Closed

Enable match on all transaction fields #28

Kraymer opened this issue Oct 4, 2015 · 2 comments
Labels

Comments

@Kraymer
Copy link
Owner

Kraymer commented Oct 4, 2015

By default qifqif matchings are based on the payee field, and are exact matches (a match is a substring of the payee field).
This assumption is what makes qifqif intuitive and easy to use but brings some limitations. Noticeably it could be useful to :

  • categorize transactions by considering many fields : eg if payee field contains xxxx and amount > 30e
  • define a match as a list of tokens present in payee field but that don't have to be sequential

Regexes to the rescue

As the current implementation covers most of the cases, adding a regex flag would allow to keep current simplicity by default while offering the power of regexes to power users

Classic mode :

Amount..: 16.80
Payee...: VIREMENT AXA FRANCE FRAIS DE SOINS
Enter category:

Expert mode (-e) :

Transaction..: 16.80 | VIREMENT AXA FRANCE FRAIS DE SOINS
Enter category:

So matching all equivalent transaction with amount between 10 and 30 e could be used by entering a match alike

^[12]\d\..*AXA FRANCE
@Kraymer Kraymer added the feature label Oct 4, 2015
@Kraymer
Copy link
Owner Author

Kraymer commented Oct 5, 2015

Rules à la iTunes smart playlists

Advanced matching mode could be entered when entering empty input on match prompt, so pressing twice Enter would be required to enter no match (instead of once actually):

Match: Enter
Match (advanced):Enter
✔ Match accepted: <none>

Advanced matching prompt would consist to enter an expression consisting of 3 tokens : field, operator, value

Match (advanced): <TAB>
FILENAME            PAYEE              AMOUNT

Match (advanced): FILENAME <TAB>
CONTAINS            NOT_CONTAINS                IS                IS_NOT
BEGINS_WITH         ENDS_WITH

Match (advanced): FILENAME BEGINS_WITH

Match (advanced): FILENAME BEGINS_WITH plop

✔ Match accepted: plop_plip.qif

Available operators should correspond to selected field, eg

Match (advanced): AMOUNT <TAB>
GREATER_THAN          LESS_THAN             IS             IS_NOT

Expressions could be chained

Match (advanced) ...: 
AMOUNT GREATER_THAN 10 <TAB>
AND      OR

Match (advanced) ...: 
AMOUNT GREATER_THAN 10 AND
<TAB>
FILENAME            PAYEE              AMOUNT

@Kraymer
Copy link
Owner Author

Kraymer commented Dec 13, 2015

fixed by 0fdb1a5

@Kraymer Kraymer closed this as completed Dec 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant