Bug 256627

Summary: Filter import doesn't work when you change default setting in "Apply this filter to incoming messages"
Product: [Applications] kmail Reporter: gerlos <gerlosgm>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: montel
Priority: NOR    
Version: 1.13.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: this exported rule can't be imported on machines different from the original one

Description gerlos 2010-11-11 19:19:44 UTC
Created attachment 53331 [details]
this exported rule can't be imported on machines different from the original one

Version:           1.13.5 (using KDE 4.5.2) 
OS:                Linux

I'm using Kmail on two computers. Same version on both. One them is running Mandriva 2010.1 and KDE SC 4.5.3 and the other one is running Kubuntu 10.04 and KDE SC 4.5.2.
I exported filter rules from one installation (clicking on "export" in the "Filter Rules" window), and tried to import them to the second installation (clicking on "import" in the "Filter Rules" window). 

I found that Kmail displays me (and imports) only rules that have the advanced option "Apply this filter to incoming messages" set to "from all accounts".
Kmail just doesn't import the filters that have this setting set to "from checked accounts only". 

I can confirm that missing rules were present in the exported file, so it seems a problem on the import side.

If I change the setting from "from checked accounts only" to "from all accounts", the rules are imported correctly.

Filters are also always imported correctly when you re-import them on the same Kmail installation.

Workaround: go to the "Advanced" tab in the rule configuration and just change the "Apply this filter to incoming messages", choosing "from all accounts". Do it for every filter you want to export to another machine.

Reproducible: Always

Steps to Reproduce:
1. Create a filter rule in the "filter rules" window.
2. Go to the Advanced tab and change the "Apply this filter to incoming messages" from "from all accounts" to "from checked accounts only"
3. Click on "Export", select file name and click OK or select just some rules from the check list.
4. Copy the file from the first computer to the second one.
5. Open the "Filter rules" window on the second computer
6. Click on "import" and select the copied file
7. the "Select filters" window is void and no rule is imported when you click "OK".

The same happens also if you swap source and destionation computers.

Actual Results:  
No rule is displayed neither imported.

Expected Results:  
It should display and import the filter rules that are saved in the exported file.

OS: Linux (i686) release 2.6.32-26-generic-pae
Compiler: cc
Comment 1 Laurent Montel 2011-09-23 10:00:55 UTC
We test filter and if there is not an same account we don't import it.
=> because not necessary
=> be sure that you have same account in other computer.
Here works fine.
I close it