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

Unexpected space added to Category filter when Regex is used to include multiple sub categories #5392

Closed
2 tasks done
rmelillo76 opened this issue Dec 1, 2022 · 6 comments
Assignees
Milestone

Comments

@rmelillo76
Copy link

rmelillo76 commented Dec 1, 2022

MMEX version:

  • 1.6.1

I have a category named "Home Projects" with multiple sub-categories. I wanted to create a report that would show the "Porch 2021" and "Porch 2022" subcategories only. I also have some transactions categorized directly under "Home Projects" only that I do not want to include and have other sub categories, so the "Include all sub-categories" checkbox doesn't meet my needs.

image

So I created (and saved) the following transaction filter and it worked perfectly:
image

However the next time I ran the filter, no transactions were displayed. Upon looking closer, I discovered an extra space was added after the : delimiter when I ran or opened the filter:
image

I also confirmed this in the database (after saving):
image

My current workaround is to use this Regex which avoids the category delimiter and there is no issue. This works but I thought I would share incase others are impacted by this behavior
image

Reproduction

Is the bug reproducible?

  • Always

Also see #5391

@whalley whalley added this to the v1.6.2 milestone Dec 2, 2022
@whalley whalley added the bug label Dec 3, 2022
n-stein added a commit to n-stein/moneymanagerex that referenced this issue Dec 5, 2022
@n-stein
Copy link
Contributor

n-stein commented Dec 5, 2022

Fixed in PR #5398

@n-stein
Copy link
Contributor

n-stein commented Dec 5, 2022

I think this also fixes #5391

Does not.

Now it does.

n-stein added a commit to n-stein/moneymanagerex that referenced this issue Dec 5, 2022
@rmelillo76
Copy link
Author

Thanks @n-stein, unfortunately the problem still persists in the latest build after your change.
To confirm, my original regex is

Home Projects: Porch.*

and my delimiter is ": "

image

The filter works initially but then it gets saved with an extra space

image

Causing the report to not work:

image

@rmelillo76
Copy link
Author

And as I test this some more, I realize that each time I open the filter dialog an additional space is added:
image
image
image
etc...

@n-stein
Copy link
Contributor

n-stein commented Dec 6, 2022

Which build did you test? You need to test 5928. Build 5929 contains a fix for a different issue, doesn't contain this code fix.

Here: https://ci.appveyor.com/project/moneymanagerex/moneymanagerex/builds/45583834

@rmelillo76
Copy link
Author

Which build did you test? You need to test 5928. Build 5929 contains a fix for a different issue, doesn't contain this code fix.

Here: https://ci.appveyor.com/project/moneymanagerex/moneymanagerex/builds/45583834

Thanks @n-stein, that did the trick. Confirmed working now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants