Bug 159420 - EDITING Autofilter for empty cells disabled when by Autofilter in other column empty cells filtered out
Summary: EDITING Autofilter for empty cells disabled when by Autofilter in other colum...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:24.8.0 target:24.2.2 target:7.6.6
Keywords: bibisected, bisected, regression
: 159990 160119 160156 (view as bug list)
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2024-01-28 22:42 UTC by Stefan_Lange_KA@T-Online.de
Modified: 2024-03-11 20:56 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document to show the behavior. (49.24 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-01-28 22:42 UTC, Stefan_Lange_KA@T-Online.de
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan_Lange_KA@T-Online.de 2024-01-28 22:42:58 UTC
Created attachment 192214 [details]
Test document to show the behavior.

In the Autofilter list for a column the entry "empty" is disabled when in an other column empty cells are filtered out (excluded, not displayed).
Reproducing the behavior:
- open the attached document "Alte Fotoapparate_Test_3_Autofilter.ods"
- select by autofilter in column B e.g. "Altix IV" or "Altix V" (or in column C e.g. "ohne") but not "(empty)" in such manor that also some empty cells in column F remain displayed
- look to the autofilter list of column F
expected: Also the entry "(empty)" is enabled (black)
found: The entry "(empty)" is disabled (gray)

The behavior depends on setting LibreOfficeDev Calc - Compute - Search criteria = and <> ...:
- when unchecked the wrong behavior also occurs when in the filter first set empty cells are not excluded
- when checked then behavior as decribed above 

Reproduced with
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ace5f5cbee7ea2c21ff9a3fe9b859b83a006edd6
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
from Win-x86_64@tb77-TDF/2024-01-28_03.25.59

The wrong behavior first occured with
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4d0f2d5ec9f7f988a1493916ae35bac1986c95a8
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
from Win-x86_64@tb77-TDF/2024-01-18_21.35.44.

The behavior was OK (as expected) until
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 25276df12abd9d002f7f899900434617b256f745
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
from Win-x86_64@tb77-TDF/2024-01-06_02.53.48
Comment 1 Xisco Faulí 2024-01-29 09:28:41 UTC
Regression introduced by:

author	Kevin Suo <suokunlong@126.com>	2024-01-16 10:13:59 +0800
committer	Kevin Suo <suokunlong@126.com>	2024-01-18 13:08:22 +0100
commit 89e032e9c4c51f52680c7d8bacf59ab2a34f2180 (patch)
tree 1616d789157eda4b1e156f4084d9edffeaa8670d
parent ab7893544dc6be6dc192dffefd57cd5ddd421c35 (diff)
tdf#158314: show Empty and Error entries as non-selected and inactive...

Bisected with: bibisect-linux64-24.8
Comment 2 Stefan_Lange_KA@T-Online.de 2024-01-29 12:06:38 UTC
After the fix for tdf#158314 was pushed also to 7.6.5 and to 24.2.1 (Commit Notification for 24.2.1: 2024-01-18 16:21:39 UTC) I have repeated my test with 24.2:

Behavior as described above can be reproduced with
Version: 24.2.1.0.0+ (X86_64) / LibreOffice Community
Build ID: d9a3985fc01f516df6ffd5e2acb93b35a87d97f8
CPU threads: 4; OS: Windows 10.0 Build 22635; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
from libreoffice-24-2/Win-x86_64@tb77-TDF/2024-01-27_10.44.22

but logically not with LO 24.2.0 rc2 (to "old")
Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: b1fd3a6f0759c6f806568e15c957f97194bbec8f
CPU threads: 4; OS: Windows 10.0 Build 22635; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 3 Xisco Faulí 2024-01-30 13:36:49 UTC
My take: https://gerrit.libreoffice.org/c/core/+/162752
Comment 4 Kevin Suo 2024-02-01 11:03:49 UTC
Xisco, since your patch is still under review, would youl like me to revert commit 89e032e9c4c51f52680c7d8bacf59ab2a34f2180 for now (at least in 7.6 as it is a stable release and the old behavior although buggy is better than the regression)?
Comment 5 Xisco Faulí 2024-02-01 11:07:38 UTC
(In reply to Kevin Suo from comment #4)
> Xisco, since your patch is still under review, would youl like me to revert
> commit 89e032e9c4c51f52680c7d8bacf59ab2a34f2180 for now (at least in 7.6 as
> it is a stable release and the old behavior although buggy is better than
> the regression)?

I think we still have time
Comment 6 Commit Notification 2024-02-29 12:00:31 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e66f5cb353bc0ea1020061bab4981380f98499b9

tdf#159420: Show empty option even if empty is filtered out

It will be available in 24.8.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 7 Xisco Faulí 2024-02-29 12:25:31 UTC
I guess we can close this one now.
Special kudos to Kevin Suo for reviewing the patch and proposing a final solution
Comment 8 Commit Notification 2024-02-29 14:48:50 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/0ddfc1c31b7d9d2a3977e0e9cbf59b9dcf2044ee

tdf#159420: Show empty option even if empty is filtered out

It will be available in 24.2.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.
Comment 9 Kevin Suo 2024-02-29 17:26:50 UTC
Verified fixed on master.
Comment 10 Stefan_Lange_KA@T-Online.de 2024-03-01 03:59:55 UTC
I have tested with
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0daeee1a7d0e530f1cce40f86a26ed01f07ee7da
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
and can confirm the problem is fixed.
Many Thanks!
Comment 11 Commit Notification 2024-03-02 09:10:38 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/2b4a485493add72ec474a3eb175069af6fbeac8b

tdf#159420: Show empty option even if empty is filtered out

It will be available in 7.6.6.

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 12 Kevin Suo 2024-03-02 10:28:22 UTC
*** Bug 159990 has been marked as a duplicate of this bug. ***
Comment 13 ady 2024-03-11 00:48:15 UTC
*** Bug 160119 has been marked as a duplicate of this bug. ***
Comment 14 ady 2024-03-11 20:56:36 UTC
*** Bug 160156 has been marked as a duplicate of this bug. ***