Bug 135125 - Autocalculate broken if autofilter was active during formula creation (steps in comment #2)
Summary: Autocalculate broken if autofilter was active during formula creation (steps ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2020-07-25 08:07 UTC by b.
Modified: 2023-05-07 04:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Containing an image to show the bug as it looked when it was just produced (291.61 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-07-25 08:54 UTC, Wolfgang Jäger
Details
Simplified example file (12.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-05-06 08:19 UTC, NISZ LibreOffice Team
Details
Screenshot of the example file after pulling down the formula, before overwriting values (54.91 KB, image/png)
2021-05-06 08:20 UTC, NISZ LibreOffice Team
Details
The example file after overwriting values in column A (55.20 KB, image/png)
2021-05-06 08:21 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description b. 2020-07-25 08:07:15 UTC
Description:
this bug is based on a question ins ask: 

https://ask.libreoffice.org/en/question/82528/calc-recalc-autocalculate-broken-if-autofilter-was-active-during-formula-creation/?comment=256845#post-id-256845

see there for details, 

be aware: repro only under very special conditions, 

be aware: as @Lupp writes: 'The issue vanishes for a formula after a fake edit and doesn't come back after undo.', and 'The issue did not persist after a Save/Load cycle. It may therefore be exerienced very rarely.'

@erAck: you fixed plenty similar issues in the past :-)  would you mind having a look, stable reproducer and simple case are avail

Steps to Reproduce:
(recipe from pmfrench)

1. In cell A1 enter "Letters" In cell A2 enter "ab" In cell A3 enter "abc" In cell A4 enter "ab" In cell A5 enter "abc"

1a. on my tests it didn't hit with two pairs of ab abc, used five in rows 2-11, 

2. With the cursor in one of those cells, select DATA/AUTOFILTER from the menus. 

3. From the drop-down arrow in cell A1, deselect ALL and tick the box in front of "abc", then click the OK button. 

4. The list should now show only the "abc" entries.

5. In cell C3, enter the formula =LEN(A3) Copy the forumla down to the row below which should be row 5. The results for both formulas should be "3"

5a. needed to copy (pull down) til row 11, all results '3', 

6. Now if you edit the contents of A3 or A5 to change the length of the string, the results of the formulas in column C should auto update, but do not.

6a. on my tests C3 and C11 updated, while C5, C7, C9 didn't, 


Actual Results:
some cells with formulas are not updated on changes in their references, 

Expected Results:
all cells updated as it's defined for autocalculate on, 


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 0d45380c99c7200075d01860a2315d0ddb450f1c
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc:
Comment 1 Wolfgang Jäger 2020-07-25 08:54:12 UTC
Created attachment 163506 [details]
Containing an image to show the bug as it looked when it was just produced

Confirmed with V7.0.0.2RC (x64) on Win 10.
This time the effect of the bug persisted over store/load on my system.

See new attachment. It also shows how the bug looked in a slightly different situation before the document aws stored. (In case another user's system kills it on reloading.)
Comment 2 NISZ LibreOffice Team 2021-05-06 08:19:47 UTC
Created attachment 171674 [details]
Simplified example file

Repro with this simple example. Steps:

* Have some texts in column A, I entered two letters in most rows, except 4-5
* Hide some of them with autofilter. I hid "cccc" in rows 4-5
* Have a simple formula such as LEN(A1) in B1

The file contains this setup. Now the action:

* Pull down the formula from B1 until B8
* Overwrite the still visible values in Column A

Result: The formula are not recalculated in B2:B3 before the hidden rows 4-5 
but they are recalculated in B6:B8 after the hidden rows.

Happens in:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9bfe083adf1fd9d470b600d0a801d144db24474f
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded
Comment 3 NISZ LibreOffice Team 2021-05-06 08:20:37 UTC
Created attachment 171675 [details]
Screenshot of the example file after pulling down the formula, before overwriting values
Comment 4 NISZ LibreOffice Team 2021-05-06 08:21:18 UTC
Created attachment 171676 [details]
The example file after overwriting values in column A
Comment 5 QA Administrators 2023-05-07 03:16:38 UTC Comment hidden (obsolete)
Comment 6 ady 2023-05-07 04:20:24 UTC
Still repro in 7.6.alpha built on 2023-05-04.

I have experienced similar situations, where AutoCalculate is not enough.

In some cases, Recalculate Hard is enough (such as for attachment 171674 [details] from comment 2), but in some other situations it isn't; only Reload shows updated values.