Bug 330946 - "Treat text as regular expression" checkbox in text filter of transaction reports loses its state
Summary: "Treat text as regular expression" checkbox in text filter of transaction rep...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.4
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-09 09:12 UTC by Francois Marier
Modified: 2014-06-19 13:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.5


Attachments
Minimal example of the problem (4.75 KB, application/x-kmymoney)
2014-02-09 09:14 UTC, Francois Marier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Marier 2014-02-09 09:12:15 UTC
The "treat text as regular expression" checkbox in the text filter tab of transaction reports loses its true state everytime a report is edited. It alternates between ON and OFF.

Reproducible: Always

Steps to Reproduce:
1. Create a new account with two transactions: one with a memo of "Rental car" and the other one with an empty memo.
2. Create a new transaction report with a text filter of "(Rental|car)" and check "Treat text as regular expression" and change the dropdown to "Does not contain".
3. Notice that the transaction with a "Rental car" memo is not shown.
4. Click the configure button and then click OK without changing anything.
Actual Results:  
The transaction with a memo of "Rental car" is shown in the report.

Expected Results:  
The transaction should be excluded from the report like it was when we created it the first time.

If you then click "Configure" and OK again, the transaction will be hidden again. The problem is that the "Treat text as regular expression" checkbox state is not set properly so the report will cycle through ON and OFF.
Comment 1 Francois Marier 2014-02-09 09:14:11 UTC
Created attachment 85059 [details]
Minimal example of the problem

Here's a minimal .kmy demonstrating the problem.

Open the report I prepared in "Favorite Reports" and then click "Configure" then OK to see the excluded transaction come back. Click "Configure" then OK again to see it disappear.
Comment 2 Christian David 2014-02-10 16:06:49 UTC
Your bug report impressed me. Well done, thank you very much!
Comment 3 Christian David 2014-02-10 16:09:55 UTC
Git commit e13f7ddec5ed89a544947f2d742462aaf782ca02 by Christian Dávid.
Committed on 10/02/2014 at 15:59.
Pushed by christiand into branch 'master'.

Checkbox for regexps in reports configuration was set in a wrong manner

Only a "!" at a wrong place. Tested it with test-file applied with bug-
report.

M  +1    -1    kmymoney/dialogs/kreportconfigurationfilterdlg.cpp

http://commits.kde.org/kmymoney/e13f7ddec5ed89a544947f2d742462aaf782ca02
Comment 4 Christian David 2014-02-10 16:25:25 UTC
Git commit aa9ce81665111774c808bf4c8b51e0b5c3f26a4a by Christian Dávid.
Committed on 10/02/2014 at 15:59.
Pushed by christiand into branch '4.6'.

Checkbox for regexps in reports configuration was set in a wrong manner

Only a "!" at a wrong place. Tested it with test-file applied with bug-
report.
(cherry picked from commit e13f7ddec5ed89a544947f2d742462aaf782ca02)

M  +1    -1    kmymoney/dialogs/kreportconfigurationfilterdlg.cpp

http://commits.kde.org/kmymoney/aa9ce81665111774c808bf4c8b51e0b5c3f26a4a