Bug 118625 - AutoFilter dropdown is lost when range has no header and the first value is filtered out
Summary: AutoFilter dropdown is lost when range has no header and the first value is f...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2018-07-08 17:19 UTC by david.cortes.rivera
Modified: 2022-08-29 17:09 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet with non-working autofilter (10.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-07-09 18:50 UTC, david.cortes.rivera
Details
short video reproducing the bug (583.62 KB, image/gif)
2018-07-09 18:51 UTC, david.cortes.rivera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description david.cortes.rivera 2018-07-08 17:19:16 UTC
If I apply the AutoFilter functionality to a cell range that has no header columns and filter out to display only blank values, the filter is then lost and the rows become hidden.

Steps to reproduce:
-Fill in random numeric values in some cell range.
-Delete at least one cell in one column in some row other than the first one.
-Add AutoFilter on that cell range *without* using the first row as headers.
-Click the autofilter arrow on some column with at least one empty/blank cell.
-Select only blank/empty values.

Expected behavior:
-Should maintain the filter (showing arrows) like it does when there is a heading column or when displaying non-blank values within the filter.

Actual behavior:
-The filter (arrows at the top row) disappears and the rows become hidden.

Setup: LO 6.0.5.2 running on Linux (Debian buster/sid).
Comment 1 Xisco Faulí 2018-07-09 11:29:56 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 david.cortes.rivera 2018-07-09 18:50:53 UTC
Created attachment 143403 [details]
spreadsheet with non-working autofilter
Comment 3 david.cortes.rivera 2018-07-09 18:51:25 UTC
Created attachment 143404 [details]
short video reproducing the bug
Comment 4 david.cortes.rivera 2018-07-09 18:53:16 UTC
(In reply to Xisco Faulí from comment #1)
> Thank you for reporting the bug. Please attach a sample document, as this
> makes it easier for us to verify the bug. 
> (Please note that the attachment will be public, remove any sensitive
> information before attaching it. 
> See
> https://wiki.documentfoundation.org/QA/
> FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help
> on how to do so.)

Added a sample document and a gif video showing how the bug happens. Note that using a header row in the autofilter prevents this behavior.
Comment 5 Xisco Faulí 2018-07-09 19:08:20 UTC
I can reproduce it in

Version: 6.2.0.0.alpha0+
Build ID: 67f3063b7c334d4d5c59132d90b938671aad09f0
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

and back to

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

@Eike, I thought you could be interested in this issue...
Comment 6 Roman Kuznetsov 2019-08-06 13:24:05 UTC
confirm on Windows too

Version: 6.4.0.0.alpha0+ (x86)
Build ID: ca6df519a78e5bfc96030c916f242b86306194e5
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 7 b. 2020-05-18 03:55:26 UTC
still an issue in 7.0.0.0.a1+, 

afaics it's not 'the autofilter' being lost but 'only' it's representation on screen (the UI), 

as well the dropdown buttons are gone as the option <data - autofilter> looks unchecked, but the filtering is! applied correctly, and if you click again on the supposedly switched off option autofilter the filtration is removed in the same manner as if you had the buttons visible and unfiltered using them, 

(the option <menu - data - autofilter> and the checkbox for it's state on/off (a real checkbox in linux, i had difficulties to spot it in windows, indicator for on/off is the background of the filter symbol becoming a little darker) are a special issue, my impression is that they are only checked for filtering ranges 'with headers', and stay unchecked for 'without'? in lin as well as in win, intentional?) 

or with <data - more filters - reset filter> you get back the unfiltered state with autofilter applied and dropdown buttons visible, 

note that the disappearing of the dropboxes doesn't depend on filtering for 'empty', they are also gone sometimes when you filter for one of the random values, and mostly after replacing the rand() values with fixed values, 

note that the autofilter reacts differently depending on whether you activate it: 
- with or without a header row (mentioned in the OP), 
- on an automatically selected range or have previously defined a <data - define range>, 
- <data - define range> also differentiates between with or without column headers, see options, 
- it even makes a difference if an automatically defined area has ever been used on a sheet, my experience is that the 'anonymouns database area' is never deleted but only changed after it's first use, and it partly influences the filters operations, 
- the filter also acts differently if you filter or sort, i have even seen the dropdown buttons from the top row appearing in cells somewhere down in the list  after sort, 

when working on this area one should pay attention to a consistent user interface, 

it might be relevant when programming to note #132488, different results before and after save-load cycles can be quite confusing ... 

my testing with: 
Version: 7.0.0.0.alpha1
Build ID: 6a03b2a54143a9bc0c6d4c7f1...
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded
and with the same ver. for win
Comment 8 b. 2020-05-18 06:36:02 UTC
autofilter also acts differently depending on the data provided, e.g. with a literal or alphanumeric 'header row' (a, b, c or a1, b2, c3), numeric data below that, and no predifined ranges: 'contains header' is automatically assumed and applied without asking the user, thus preventing to produce the situation of the OP
Comment 9 Stéphane Guillou (stragu) 2021-06-17 13:17:24 UTC
Reproduced with:

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: de7356c2e0cb099fac396808b5a86a0393b48e5f
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-14_22:38:17
Calc: threaded

Changing title as it is not required to select a blank value to reproduce.

Steps:
1. Fill a range with numbers in a single column
2. Select said range
3. Data > AutoFilter
4. Answer "No" when asked about using the first line as a header
5. Click the AutoFilter dropdown, deselect the first value, click "OK"

Result: the AutoFilter dropdown disappears.

I'm wondering what would be a preferred solution:
- Always enforce headers for AutoFilter? or
- Move autofilter dropdown menu to the first visible cell in the AutoFilter range? (Which means you end up with an AutoFilter dropdown menu that is technically below the top of the range.)
Comment 10 david.cortes.rivera 2021-06-17 14:17:46 UTC
(In reply to stragu from comment #9)
> Reproduced with:
> 
> Version: 7.3.0.0.alpha0+ / LibreOffice Community
> Build ID: de7356c2e0cb099fac396808b5a86a0393b48e5f
> CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time:
> 2021-06-14_22:38:17
> Calc: threaded
> 
> Changing title as it is not required to select a blank value to reproduce.
> 
> Steps:
> 1. Fill a range with numbers in a single column
> 2. Select said range
> 3. Data > AutoFilter
> 4. Answer "No" when asked about using the first line as a header
> 5. Click the AutoFilter dropdown, deselect the first value, click "OK"
> 
> Result: the AutoFilter dropdown disappears.
> 
> I'm wondering what would be a preferred solution:
> - Always enforce headers for AutoFilter? or
> - Move autofilter dropdown menu to the first visible cell in the AutoFilter
> range? (Which means you end up with an AutoFilter dropdown menu that is
> technically below the top of the range.)

I'd expect the dropdown arrow to remain at the top row.
Comment 11 Stéphane Guillou (stragu) 2022-08-29 17:08:05 UTC
This is somewhat related to bug 118625: the AutoFilter button should always stay at the top of the AutoFiltered range, regardless of its sorting or its filtering.

Still the case with:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 24087697d5cf78aac346d4dcea0596373e15a95c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded