Bug Hunting Session
Bug 117276 - Autofilter settings being reset in some cases
Summary: Autofilter settings being reset in some cases
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Serge Krot (CIB)
URL:
Whiteboard: target:6.2.0 target:6.3.0 target:6.2....
Keywords:
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2018-04-27 08:53 UTC by Samuel Mehrbrodt (CIB)
Modified: 2019-07-16 22:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Bugdoc (15.57 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-04-27 08:53 UTC, Samuel Mehrbrodt (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (CIB) 2018-04-27 08:53:37 UTC
Created attachment 141681 [details]
Bugdoc

How to reproduce:

1. open attached file
2. open filter of column B (Fabrikat) and deselect (Citroen, Fiat, Ford, Opel, Peugeot, Renault, Tesla)
3. open filter of column I (Wert) and deselect 8000 (Values 7000 and 9000 are not shown)
4. open filter of column B and select Tesla
5. open filter of column I and select 7000

Result:
Now the filter of column B is reset

Expected:
The filter should still be as configured in step 2.
Comment 1 Marina Latini (CIB) 2018-04-27 09:05:41 UTC
repro on:

Version: 6.1.0.0.alpha1
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Linux 4.16; UI render: default; VCL: gtk2; 
Locale: it-IT (it_IT.UTF-8); Calc: group
Comment 2 Xisco Faulí 2018-04-27 09:42:15 UTC
Reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.13; Render: default;

and

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 3 Serge Krot (CIB) 2018-06-05 08:01:15 UTC
Reproduced in Version: 5.3.0.1
Build ID: 3b800451b1d0c48045de03b5b3c7bbbac87f20d9
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group
Comment 4 Commit Notification 2018-06-12 14:10:24 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c8a739a2c84f45f878d2ae75eaf16a2f814d1c6e

tdf#117276 filter reset: check complete data range selected

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Marina Latini (CIB) 2018-06-16 14:19:12 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #0)
> Created attachment 141681 [details]
> Bugdoc
> 
> How to reproduce:
> 
> 5. open filter of column I and select 7000
> 
> Result:
> Now the filter of column B is reset
> 
> Expected:
> The filter should still be as configured in step 2.

with 

Version: 6.2.0.0.alpha0+
Build ID: e79dd394deedaeed122717700077b77d94360c12
CPU threads: 4; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: it-IT (it_IT.UTF-8); Calc: group threaded

can't execute the step 5.
After Step 4 the value 7000 in column I isn't visible.
Comment 6 Serge Krot (CIB) 2018-06-18 08:24:03 UTC
(In reply to Marina Latini (CIB) from comment #5)
> (In reply to Samuel Mehrbrodt (CIB) from comment #0)
> > Created attachment 141681 [details]
> > Bugdoc
> > 
> > How to reproduce:
> > 
> > 5. open filter of column I and select 7000
> > 
> > Result:
> > Now the filter of column B is reset
> > 
> > Expected:
> > The filter should still be as configured in step 2.
> 
> with 
> 
> Version: 6.2.0.0.alpha0+
> Build ID: e79dd394deedaeed122717700077b77d94360c12
> CPU threads: 4; OS: Linux 4.16; UI render: default; VCL: kde4; 
> Locale: it-IT (it_IT.UTF-8); Calc: group threaded
> 
> can't execute the step 5.
> After Step 4 the value 7000 in column I isn't visible.

This is because you use latest master version where the new strategy of the filter is implemented (which strings to show and which to hide, when multiple filters are in used). If you take for example LO 5.3.0.1, you will see unchecked 7000, 8000, 9000 before 5th step.

The issue "what is to show in the filter when rows are filtered with multiply filters" is just related to this task and should be checked outside of this task. This task is for fix of the filter reset condition.

The reason (why we do not see all possible strings in filter) is coming from this code:

void ScDocument::GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries& rFilterEntries )
{
...
            if ( bFilter )
            {
                maTabs[nTab]->GetFilteredFilterEntries( nCol, nStartRow, nEndRow, aParam, rFilterEntries );
            }
            else
            {
                maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rFilterEntries );
            }
...
}

There should be provide the better calculation of the bFilter flag that in some cases the strings (hidden bu other filters) will be non hidden in current filter.
Comment 7 Commit Notification 2018-12-21 18:32:40 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/83e957bfbfa22980461b6c0f07231902549504d4%5E%21

uitest for bug tdf#117276

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-02-02 13:30:48 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/1b36fbaa7f110739873c69f0d5eeb4fc5d1cf335%5E%21

uitest for bug tdf#117276

It will be available in 6.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2019-04-12 09:48:26 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/4e7e3670c31329d60f5cc782abc4568c2aba33a7%5E%21

tdf#117276 sc: autofilter was unexpected reset with OK pressed

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2019-07-16 17:33:04 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9bd7e2cdf7d2b247ae99a2ce71449d9f265032d1%5E%21

tdf#126306: ignore Top10, Empty and NonEmpty in fix for tdf#117276

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2019-07-16 22:37:57 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/5f48428533e928868c11ddd00cc449a54d0cdfd9%5E%21

tdf#126306: ignore Top10, Empty and NonEmpty in fix for tdf#117276

It will be available in 6.3.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.