Bug 151152 - Autofilter checkbox status is wrong when I deselect one item, click OK, then click on the dropdown again (2nd case)
Summary: Autofilter checkbox status is wrong when I deselect one item, click OK, then ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.6.0 target:7.4.6 target:7.5....
Keywords: bibisected, bisected, regression
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2022-09-23 17:25 UTC by Kevin Suo
Modified: 2023-01-24 10:36 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:
Regression By: Balazs Varga


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2022-09-23 17:25:21 UTC
Steps to Reproduce:
1. Open the ods file of attachment 182055 [details] in bug 150647.
2. Click the autofilter dropdown in column D named "Select", then deselect the 2nd item (i.e. uncheck the checkbox before item "2020-01-4"), click OK.
--> This unchecked item is excluded in the record shown, good.
3. Click the autofilter drop in column D again.

Current Result:
All items in column D are shown as checked status in step 3, while this column is still (correctly) indicated as in a filtered state.

Expected Result:
Since I have deselected that item in step 3, that item should still be deselected in step 3.

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 18f4fc547a8c055afdaec4aad69c9fea387696c3
CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Build Platform: Fedora34@X64, Branch:master, bibisect-linux-64-7.4-CN
Calc: threaded

Also in
Version: 7.4.3.0.0+ and 7.3.7+.
Comment 1 Kevin Suo 2022-09-23 17:31:51 UTC
Bibisected to range: 8ea9a8bc43ea054521a44dc8e3bc537110ca9e33..857943a0e4e75f12ffe7b1dc9d91ef88fbdb75d6

https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=8ea9a8bc43ea054521a44dc8e3bc537110ca9e33..857943a0e4e75f12ffe7b1dc9d91ef88fbdb75d6

Regression introduced in 7.3.0.0 alpha0+.

The following commit seems related:

commit f6b143a57d9bd8f5d7b29febcb4e01ee1eb2ff1d
Author: Balazs Varga <balazs.varga991@gmail.com>
Date:   Fri Jul 2 09:40:32 2021 +0200

    tdf#142910 sc filter: fix "greater than" or "smaller than" etc
    
    Filter "greater than" or "smaller than" (>, <, >=, <=)
    conditions according to the cell number format.
    
    Regression from commit: d5c2584bf36d21580db677b231c57f99f49aa2cb
    (Related: tdf#140968 avoid duplicated filter values)
    
    Follow-up to commit: 1f755525189884e4b2824889a6b9dea8933402db
    (tdf#142402 sc UI: store formatted values in standard filter)
    
    Clean-up for commit: d5c2584bf36d21580db677b231c57f99f49aa2cb
    (Related: tdf#140968 avoid duplicated filter values)
    
    Change-Id: I1284892398c9964ca5407b4d617a617f20341107
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118272
    Tested-by: Jenkins
    Tested-by: László Németh <nemeth@numbertext.org>
    Reviewed-by: László Németh <nemeth@numbertext.org>

Adding cc to Balazs Varga: could you please take a look? Thanks.
Comment 2 Rafael Lima 2022-09-26 22:08:08 UTC
Repro with

Version: 7.3.6.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.6-0ubuntu0.22.04.1
Calc: threaded

Also repro with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 8b5a989dcdcf4edd50c9fdb092d4180432ce4b6a
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded

It does filter correctly though. But the "2020-01-4" entry remains checked in the AutoFilter even after unchecking it.
Comment 3 Aron Budea 2022-11-21 02:15:09 UTC
(In reply to Kevin Suo from comment #1)
> The following commit seems related:
> 
> commit f6b143a57d9bd8f5d7b29febcb4e01ee1eb2ff1d
Confirmed by checking this and the predecessor commit in the linux-64-7.3 bibisect repo.
Comment 4 Gabor Kelemen (allotropia) 2022-11-25 11:24:52 UTC
@NISZ team maybe one for you?
Comment 5 Commit Notification 2022-12-19 11:03:03 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2298087db28ee1b4251cac6e12c1d4806b395a1e

tdf#151152 sc filter: fix string entry checking

It will be available in 7.6.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 6 Commit Notification 2022-12-19 15:14:57 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/6faac931869ad06ce38216148da2450652c1091b

tdf#151152 sc filter: fix string entry checking

It will be available in 7.4.5.

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 Commit Notification 2022-12-20 07:50:53 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/438192f4947669e6c514bc25ce95d9eba38ce39c

tdf#151152 sc filter: fix string entry checking

It will be available in 7.5.0.0.beta2.

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 NISZ LibreOffice Team 2022-12-21 09:41:33 UTC
Verified in:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7d948d5c7edbbfd29a77b97a5101aa43917e5ec2
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL threaded
Comment 9 Xisco Faulí 2023-01-24 10:36:17 UTC
7.4.5 was a hotfix release, updating target in status-whiteboard