Bug 124701 - EDITING existing spreadsheet: counting the number of autofiltered records doesn't work
Summary: EDITING existing spreadsheet: counting the number of autofiltered records doe...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:7.2.0
Keywords: bibisected, bisected, regression
: 138185 (view as bug list)
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2019-04-12 09:10 UTC by NISZ LibreOffice Team
Modified: 2021-04-28 15:49 UTC (History)
7 users (show)

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


Attachments
A simple spreadsheet with an applied AutoFilter. (7.72 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-04-12 09:10 UTC, NISZ LibreOffice Team
Details
A screenshot showcasing the issue. (313.50 KB, image/png)
2019-04-12 09:11 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-04-12 09:10:23 UTC
Description:
LibreOffice Calc shows the number of shown records in the status bar at the bottom when an autofilter is applied in the active column (like: “6 of 9 records found”). This works well until the file is saved and then reopened. The filter is still applied but the status bar shows the value as if every record would be shown (like: “9 of 9 records found”). Changing the filter settings updates the value showing the correct value once again, until the file is reloaded again. The issue can be reproduced both with using ODS or XLSX format for saving the spreadsheet.

Steps to Reproduce:
    1. Create a new spreadsheet in LibreOffice Calc.
    2. Fill the first few rows in the A column with (preferably repeating) values.
    3. Apply an AutoFilter to the first column and filter out a few results.
    4. Check the status bar: it should show the correct number of filtered records (like: “7 of 10 records found”)
    5. Save the file as ODS.
    6. Reload the file and check the value of filtered records in the status bar.

Actual Results:
The status bar shows the wrong value, as if every record would be shown (like: “9 of 9 records found”)

Expected Results:
The status bar should show the correct value for the number of filtered records, even after saving and reloading the file.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.3.0.0.alpha0+ (x64)
Build ID: 74288f5af28de3d14044c951e7e5d62bb2e22301
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-04-12_00:11:21
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded
Comment 1 NISZ LibreOffice Team 2019-04-12 09:10:59 UTC
Created attachment 150713 [details]
A simple spreadsheet with an applied AutoFilter.
Comment 2 NISZ LibreOffice Team 2019-04-12 09:11:29 UTC
Created attachment 150714 [details]
A screenshot showcasing the issue.
Comment 3 m.a.riosv 2019-04-12 09:21:04 UTC

*** This bug has been marked as a duplicate of bug 84517 ***
Comment 4 Gabor Kelemen (allotropia) 2019-04-12 09:44:16 UTC
(In reply to m.a.riosv from comment #3)
> 
> *** This bug has been marked as a duplicate of bug 84517 ***

I don't agree. That one is about selected columns and rows, while this is about autofilter results counting.
Similar features, but not the same.
Comment 5 b. 2019-04-12 21:16:49 UTC
can confirm bug, happens with standard filters too, astonishing how many bugs are kept in the system for long times ...
Comment 6 raal 2019-04-13 08:16:09 UTC
Confirm with Version: 6.3.0.0.alpha0+
Build ID: 31ac398cfa30694b18240d31df17a58d699b5bf6
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Comment 7 raal 2019-04-13 08:28:04 UTC
This seems to have begun at the below commit.
Adding Cc: to Dennis Francis ; Could you possibly take a look at this one?
Thanks
 574300e9d7979fd9b5595bc5acfa8967cf415419 is the first bad commit
commit 574300e9d7979fd9b5595bc5acfa8967cf415419
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Sun Dec 10 03:18:15 2017 +0100

    source sha:1e619fdf9e79cb49895d83fe7f5a1f373495b915

author	Dennis Francis <dennisfrancis.in@gmail.com>	2016-01-22 22:14:54 +0530
committer	Eike Rathke <erack@redhat.com>	2016-02-03 13:23:29 +0000
commit 1e619fdf9e79cb49895d83fe7f5a1f373495b915 (patch)
tree af2980470f99e92e129919c8d5a595b3e5f3e8ae
parent d9e362e4516a5df77f3edd12d57ce224a0a4979d (diff)
tdf#34873 : Better way to show autofilter count
Comment 8 Xisco Faulí 2019-08-06 14:29:18 UTC
Dear Dennis Francis,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 9 Wolfgang Jäger 2020-11-13 13:15:11 UTC
*** Bug 138185 has been marked as a duplicate of this bug. ***
Comment 10 LeroyG 2020-11-13 19:41:33 UTC
Confirmed at LibreOffice 6.4.7.2 (x86); OS: Windows 6.1.
Comment 11 László Németh 2021-02-28 09:59:56 UTC
*** Bug 140085 has been marked as a duplicate of this bug. ***
Comment 12 Commit Notification 2021-02-28 10:26:15 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

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

tdf#124701 sc status bar: hide bad filtered row count

It will be available in 7.2.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 13 László Németh 2021-02-28 10:34:33 UTC
UX question: now the status bar don't show the false "9 of 9 records found" on load, but maybe it's better to show something "??? of 9 records found". What is your opinion? It seems for me a little bit awkward, but because it's informative, it could be useful, and using it it's free: all data is available in the source code (except the actual amount of the filtered rows, which we don't want to calculate to avoid its extra overhead or its possible dependence problems, like MSO does).
Comment 14 Xisco Faulí 2021-03-01 08:34:48 UTC
(In reply to László Németh from comment #13)
> UX question: now the status bar don't show the false "9 of 9 records found"
> on load, but maybe it's better to show something "??? of 9 records found".
> What is your opinion? It seems for me a little bit awkward, but because it's
> informative, it could be useful, and using it it's free: all data is
> available in the source code (except the actual amount of the filtered rows,
> which we don't want to calculate to avoid its extra overhead or its possible
> dependence problems, like MSO does).

I'm wondering if this should be discussed in a new ticket and add the UX team in the loop ?
Comment 15 NISZ LibreOffice Team 2021-03-08 14:08:40 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 72841008bf422dfd8553240b3a78f0474d03523c
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded Jumbo