Bug 56187 - Standard Filter gets wrong criteria from Autofilter and vice versa
Summary: Standard Filter gets wrong criteria from Autofilter and vice versa
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Spreadsheet (show other bugs)
Version: 3.5.6.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-19 15:56 UTC by oli
Modified: 2013-06-09 15:04 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Test data to reproduce the Errors (9.79 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-10-19 15:56 UTC, oli
Details

Description oli 2012-10-19 15:56:17 UTC
Created attachment 68805 [details]
Test data to reproduce the Errors

Terms: 
- Autofilter (AF)
- Standard Filter (SF)

Please do the following:

* load Test.ODS:

Zeile	Wert_1	Wert_2
1	1	a
2	1	b
3	1	c
4	2	a
5	2	b
6	2	c
7	3	a
8	3	b
9	3	c
10	4	a
11	4	b
12	4	c

* click Wert_1 / AF ; unmark [3] and [4] ; click <ok>

Zeile	Wert_1	Wert_2
1	1	a
2	1	b
3	1	c
4	2	a
5	2	b
6	2	c
(this is ok)

* click Wert_1 / AF ; click <Standard Filter ...> and look at the creteria:
   Wert_1 = 1
only the first creteria from AF is passed to SF 

It should read:
   Wert_1 = 1
OR Wert_1 = 2

the second line is missing ;

  click <Cancel>

Zeile	Wert_1	Wert_2
1	1	a
2	1	b
3	1	c
4	2	a
5	2	b
6	2	c

* click Wert_2 / AF ; unmark [a] ; click <ok>

Zeile	Wert_1	Wert_2
2	1	b
3	1	c
5	2	b
6	2	c
(this is ok)

* click Wert_2 / AF ; click <Standard Filter ...> and look at the creteria:
    Wert_1 = 1
AND Wert_2 = b

only the first AF-creteria from each column is passed to SF
OR-Creteria and brackets!!! are not considered about.
So this should read without brackets

    Wert_1 = 1
AND Wert_2 = b
OR  Wert_1 = 1
AND Wert_2 = c
OR  Wert_1 = 2
AND Wert_2 = b
OR  Wert_1 = 2
AND Wert_2 = c

[maybe somebody can think about introducing brackets, then we would get:
(Wert_1 = 1 OR Wert_1 = 2) AND (Wert_2 = b OR Wert_2 = c)   ] 

 add missing lines to SF ; click <ok>

Zeile	Wert_1	Wert_2
2	1	b
3	1	c
5	2	b
6	2	c
(this is ok)

* click Wert_1 / AF and look at the checkboxes
only [1] is checked ; 2 is missing!!

  click <ok> 

Zeile	Wert_1	Wert_2
2	1	b
3	1	c
5	2	b
6	2	c
(this is wrong!)

Either [2] should be checked or this should read:

Zeile	Wert_1	Wert_2
2	1	b
3	1	c

* click Wert_2 / AF and look at the checkboxes
only [b] is checked ; c is missing!!
the same like above-

--- end of test ---

please check filter syntax
thank you!
Comment 1 ign_christian 2013-06-09 15:04:01 UTC
I can confirm this behavior using LO 4.0.4.1 (Win7 32bit)

Standard filter isn't synchronized with Auto filter when used in conjuction. That behavior could confusing users.

> [maybe somebody can think about introducing brackets, then we would get:
> (Wert_1 = 1 OR Wert_1 = 2) AND (Wert_2 = b OR Wert_2 = c)   ] 
Perhaps it's a good idea if possible. Don't know how that behave on Excel?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.