Bug 196352

Summary: filters: custom filters are deleted on dialog-close because of errors
Product: [Applications] kmail Reporter: Maciej Pilichowski <bluedzins>
Component: filteringAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: jon.armond
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Unspecified   
Latest Commit: Version Fixed In:

Description Maciej Pilichowski 2009-06-13 17:42:15 UTC
Version:            (using KDE 4.2.90)
Installed from:    SuSE RPMs

Some time ago I wrote report about warning user about non valid filters:
https://bugs.kde.org/show_bug.cgi?id=137294

In a way it is implemented. Invalid filters are deleted. This is completely wrong -- when you write a program, would you expect compiler output says:
"Syntax error: your source file has been deleted"

? I think no. So why deleting filter rules because of user omission:
a) warn user, correct
b) mark the filter as invalid (inactive)

ad.b) let the user _correct_ the filter, don't make him/her start entire filter from scratch
Comment 1 Maciej Pilichowski 2009-06-13 17:43:34 UTC
PS. Current behaviour has an absurd side-effect, when there are no filters, the default one is created automatically. User clicks ok, filter is deleted, you go see filters, it is recreated again. And so on...
Comment 2 Jonathan Armond 2009-06-15 21:54:04 UTC
Hmmmm.. I thought it made sense to warn that the default is not saved, since the Ok implies saving. It's never deleted, because it is not saved.

You can press Apply to check whether a complex filter is invalid without any danger. But I agree it is unexpected to lose your half-finished filter.
Comment 3 Jonathan Armond 2009-06-24 14:00:12 UTC
SVN commit 986219 by jarmond:

Give user the option to continue editing filters after being warned they
are invalid. Addresses usability complaint in bug 196352.

BUG: 196352

 M  +63 -20    kmfilterdlg.cpp  
 M  +15 -4     kmfilterdlg.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=986219