Bug 65505 - FILTER: Auto filter checkbox missing for "empty" cells
Summary: FILTER: Auto filter checkbox missing for "empty" cells
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: medium enhancement
Assignee: Deena Francis
URL:
Whiteboard: BSA target:5.0.0
Keywords:
: 44895 68872 78259 82821 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-07 12:31 UTC by sulai
Modified: 2020-10-11 12:09 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Demonstration that Missing Is Not Working (8.38 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-02-05 03:37 UTC, Joel Madero
Details
Sample spreadsheet with two Autofilter columns with some empty cells (10.22 KB, application/octet-stream)
2015-02-05 23:15 UTC, Pedro
Details
screenshot of adding filter on Column = Test (326.21 KB, image/jpeg)
2015-02-06 00:09 UTC, Deena Francis
Details
Screenshot of result of the filter applied Control=a Test=Empty Test=2 (334.72 KB, image/jpeg)
2015-02-06 00:11 UTC, Deena Francis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sulai 2013-06-07 12:31:19 UTC
Problem description: 

Steps to reproduce:
1. from the menu, choose Data > Filter > Autofilter
2. when clicking on the auto-filter-dropdown, there is a list of checkboxes, which shows possible values of that column

Current behavior:
there is no checkbox representing empty cells

Expected behavior:
there should be a checkbox like 
[ ] (empty)
This would enable the user to easily include empty cells among other values. Eg "Show me all entries which have the value 1 or empty."

Known workaround:
use the standard filter option
Operating System: Ubuntu
Version: 4.0.2.2 release
Comment 1 ign_christian 2013-06-08 10:25:23 UTC
There are 'Empty' and 'Not Empty' options (without checkbox) above 'Standard Filter...' option.

LO 4.0.4.1
Comment 2 ign_christian 2013-06-09 15:08:59 UTC
I'm really sorry for not reading description carefully.

> Expected behavior:
> there should be a checkbox like 
> [ ] (empty)
> This would enable the user to easily include empty cells among other values.
> Eg "Show me all entries which have the value 1 or empty."
At present that's not possible.

So marking this as Enhancement request
Comment 3 sulai 2013-06-09 17:19:09 UTC
Thank you very much :)
Comment 4 Joel Madero 2014-11-06 22:00:58 UTC
Looks like this was confirmed as an enhancement request. Moving to NEW.
Comment 5 Kevin Suo 2014-11-10 06:33:11 UTC
*** Bug 82821 has been marked as a duplicate of this bug. ***
Comment 6 Kevin Suo 2014-11-10 06:46:26 UTC
*** Bug 44895 has been marked as a duplicate of this bug. ***
Comment 7 Kevin Suo 2014-11-10 06:47:01 UTC
*** Bug 68872 has been marked as a duplicate of this bug. ***
Comment 8 Kevin Suo 2014-11-10 06:47:23 UTC
*** Bug 78259 has been marked as a duplicate of this bug. ***
Comment 9 Rob 2014-11-10 12:25:07 UTC
(In reply to Kevin Suo from comment #6)
> *** Bug 44895 has been marked as a duplicate of this bug. ***

I think you should always mark the newer as duplicate. If the description, or the ewxamples are better in the new bug, copy them over to the older bug. 
If you don't adhere to this you'll screw up the bug resolution statistics, and probably the prioritization.
Comment 10 alister.hood 2014-11-10 22:41:09 UTC
If all these issues are folded into one, Bug 68406 needs to be included as well.  But whichever one it is, maybe its importance should be "normal" rather than "enhancement" - some aspects of the current behaviour are simply wrong.
Comment 11 Kevin Suo 2014-11-12 02:32:49 UTC
(In reply to Rob from comment #9)
Per this wiki:
https://wiki.documentfoundation.org/QA/Bugzilla/FAQ#How_to_Mark_a_Bug_as_Duplicate

It says: 
> Generally the latest report will be marked as a DUP of a more early report, except the new report contains more information or has a more advanced status (Assigned).

I mark Bug 44895 as a duplicate of bug 65505, because bug 65505 "contains more information" in the main report section (clear steps to reproduce, current behaviour and expected behaviour), which is important for devs to understand. People don't have to read more than 10 comments in order to understand what's the issue here.

The most importantly, bug 65505 is the root cause of bug 44895 (Autofilter can work with checkbox selection if column cells contain only one value and empty cells, *Only when* there is a "Empty" checkbox.)
Comment 12 Deena Francis 2014-12-21 07:01:10 UTC
Submitted a patch at https://gerrit.libreoffice.org/#/c/13573/.


--
Deena Francis
Affiliation : Libre Data Consultancy Services (P) Ltd.
Comment 13 Joel Madero 2015-02-05 03:36:50 UTC
I just tested this and it doesn't work. Attached is a simple document that show that it isn't working.
Comment 14 Joel Madero 2015-02-05 03:37:27 UTC
Created attachment 113135 [details]
Demonstration that Missing Is Not Working
Comment 15 Deena Francis 2015-02-05 22:46:46 UTC
(In reply to Joel Madero from comment #13)
> I just tested this and it doesn't work. Attached is a simple document that
> show that it isn't working.

Joel,

It works if you *select* the entire data and then click autofilter. https://help.libreoffice.org/Calc/AutoFilter

Please let me know if the patch still does not work for you.

--
Deena
Comment 16 Pedro 2015-02-05 23:15:11 UTC
Created attachment 113162 [details]
Sample spreadsheet with two Autofilter columns with some empty cells
Comment 17 Pedro 2015-02-05 23:15:49 UTC
(In reply to Deena P.F. from comment #15)

> It works if you *select* the entire data and then click autofilter.
> https://help.libreoffice.org/Calc/AutoFilter
> 
> Please let me know if the patch still does not work for you.

Deena, you are not supposed to need to select data. Joel's example wasn't very conclusive (I have attached a modified version)

The problem here is that since Empty is not an item from the multi-item List, if you select Empty, you can not select another value (i.e. you can only get Control=a AND Test=Empty OR Control=a AND Test=2). The request is that you might filter cells that are Control=a AND Test=Empty AND Control=a AND Test=2

Hope this clarifies the request.
Comment 18 Deena Francis 2015-02-06 00:09:33 UTC
Created attachment 113165 [details]
screenshot of adding filter on Column = Test
Comment 19 Deena Francis 2015-02-06 00:11:15 UTC
Created attachment 113166 [details]
Screenshot of result of the filter applied Control=a Test=Empty Test=2
Comment 20 Joel Madero 2015-02-06 00:13:08 UTC
So weird - now it works fine. Anyways. Thanks for the patch. Closing this one as FIXED.
Comment 21 Deena Francis 2015-02-06 00:15:13 UTC
(In reply to Pedro from comment #17)
> (In reply to Deena P.F. from comment #15)
> 
> > It works if you *select* the entire data and then click autofilter.
> > https://help.libreoffice.org/Calc/AutoFilter
> > 
> > Please let me know if the patch still does not work for you.
> 
> Deena, you are not supposed to need to select data. Joel's example wasn't
> very conclusive (I have attached a modified version)
> 
> The problem here is that since Empty is not an item from the multi-item
> List, if you select Empty, you can not select another value (i.e. you can
> only get Control=a AND Test=Empty OR Control=a AND Test=2). The request is
> that you might filter cells that are Control=a AND Test=Empty AND Control=a
> AND Test=2
> 
> Hope this clarifies the request.

I am able to select Control=a, Test=Blank, Test=2 correctly with patch applied on master HEAD=5a94bc910aa4418326aef894fc412ab71b24bd31
Attached screenshots showing this. I will test with the latest master soon.
Comment 22 Pedro 2015-02-06 00:29:11 UTC
(In reply to Deena P.F. from comment #21)

> I am able to select Control=a, Test=Blank, Test=2 correctly with patch
> applied on master HEAD=5a94bc910aa4418326aef894fc412ab71b24bd31
> Attached screenshots showing this. I will test with the latest master soon.

I assumed (wrongly) that it would be included in 4.4.0.3 since your patch was released well before 4.4.0 RC3. My bad for expecting this to be included in branch 4.4

In any case, now that you added Blank, it makes no sense to keep Empty and Not Empty in the filter drop menu.

Should I open another Bug for this issue?

In any case, Thank You! for fixing this annoying bug :)
Comment 23 Deena Francis 2015-02-06 00:40:46 UTC
(In reply to Pedro from comment #22)
> (In reply to Deena P.F. from comment #21)
> 
> > I am able to select Control=a, Test=Blank, Test=2 correctly with patch
> > applied on master HEAD=5a94bc910aa4418326aef894fc412ab71b24bd31
> > Attached screenshots showing this. I will test with the latest master soon.
> 
> I assumed (wrongly) that it would be included in 4.4.0.3 since your patch
> was released well before 4.4.0 RC3. My bad for expecting this to be included
> in branch 4.4

Unfortunately the patch in gerrit is not yet reviewed/merged and I am a beginner so I don't have commit access.

> 
> In any case, now that you added Blank, it makes no sense to keep Empty and
> Not Empty in the filter drop menu.
> 
> Should I open another Bug for this issue?

I think another bug report would be nice as it will bring fresh attention and comments/opinions.
Comment 24 Pedro 2015-02-06 01:05:57 UTC
The Blank option does not show up under 

Version: 4.5.0.0.alpha0+
Build ID: 6e1d28efb3d314d553e970f197f19636ce4e0ded
TinderBox: Win-x86@39, Branch:master, Time: 2015-02-05_07:26:02
Locale: pt_PT

running on Windows XP Pro x86 SP3
Comment 25 Deena Francis 2015-02-06 01:11:17 UTC
(In reply to Pedro from comment #24)
> The Blank option does not show up under 
> 
> Version: 4.5.0.0.alpha0+
> Build ID: 6e1d28efb3d314d553e970f197f19636ce4e0ded
> TinderBox: Win-x86@39, Branch:master, Time: 2015-02-05_07:26:02
> Locale: pt_PT
> 
> running on Windows XP Pro x86 SP3

This is because the patch is not yet merged to master.
Comment 26 Kevin Suo 2015-02-06 04:11:32 UTC
why is this marked FIXED? the patch is not merged at all.
Comment 27 Joel Madero 2015-02-06 04:46:05 UTC
I see an option for "empty" in my master built last night - I assumed that meant it was resolved.
Comment 28 Joel Madero 2015-02-06 04:47:53 UTC
Ideally when you add a filter - you wouldn't have to manually select the entire column. Instead the filter would automatically check to see what the last row that contains a value is, and then include everything from the filter to that cell.

If you look in my test document you can see the issue. I suppose this should be another enhancement request.

@Deena - any interest in being cc'ed on that one ?
Comment 29 Pedro 2015-02-06 10:35:50 UTC
(In reply to Joel Madero from comment #28)
> Ideally when you add a filter - you wouldn't have to manually select the
> entire column. Instead the filter would automatically check to see what the
> last row that contains a value is, and then include everything from the
> filter to that cell.
> 
> If you look in my test document you can see the issue. I suppose this should
> be another enhancement request.
> 
> @Deena - any interest in being cc'ed on that one ?

I didn't realize it wasn't accepted yet. It was marked as FIXED and you (Joel) confirmed it worked so I assumed it was already in Master (and therefore Comment #24).

As a consequence I jumped ahead and submitted Bug #89158 (and took the liberty of CCing Deena)

I really hope this moves forward because this is really an important missing feature for anyone that uses Autofilter.
Comment 31 b. 2020-10-11 12:09:24 UTC
there is something 'funny' with that checkbox, see https://bugs.documentfoundation.org/show_bug.cgi?id=68113#c8