wish: Automatic assignments based on regular expressions

Bug #1500235 reported by slodki
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Wishlist
Maxime DOYEN

Bug Description

There should be option to match memo or payee with RE in automatic assignment definition, not only simple substring match.

1. This will allow consolidate multiple auto assignment definitions into one, making managing of them simpler.

2. It will allow match very short strings - using \b (empty string at the edge of the word) it's possible to find whole word and not part of different longer name.

3. Context matching (some name followed by space and 4 digits, names with optional part in the middle etc.) will be possible to.

It can be done using current definition mechanism, some RE ready to use library, and simple conditional switch in the existing matching code.

As matching substring is used as definition name now, additional attribute with definition display name/description should be added, because RE are not user friendly to display in GUI list, sorting etc. Case insensitive match option should be avaiable with RE too.

See attached new GUI proposal for Manage Assignments window.

Revision history for this message
slodki (slodki) wrote :
slodki (slodki)
Changed in homebank:
assignee: nobody → slodki (slodki)
status: New → In Progress
Revision history for this message
slodki (slodki) wrote :

Changed assignment window screenshot

Revision history for this message
slodki (slodki) wrote :

Added example of new functionality:
- new rules definitions using RE
- example of matching RE in transactions and splits
xhb file attached in new 1.2 format requires my new latest trunk+re homebank version

Revision history for this message
slodki (slodki) wrote :

New functionality implemented and tested.
Implementation based on https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html, documentation of RE used available at https://developer.gnome.org/glib/stable/glib-regex-syntax.html.

Changed assignment management window layout (see screenshot).
File format version bumped to 1.2: patt attribute added to assignment definition (see attached example).

Compiled under linux without warnings and working as expected.
Tested:
- importing old file format
- saving and opening new xhb format
- adding, modifying assignment rules
- matching simple text with old method (substring search)
- matching using RE in transactions and splits

slodki (slodki)
Changed in homebank:
status: In Progress → Fix Committed
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → In Progress
Maxime DOYEN (mdoyen)
Changed in homebank:
milestone: none → 5.1
Maxime DOYEN (mdoyen)
Changed in homebank:
assignee: slodki (slodki) → Maxime Doyen (mdoyen)
importance: Undecided → Wishlist
Maxime DOYEN (mdoyen)
Changed in homebank:
status: In Progress → Fix Committed
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.