Bug 48025 - EDITING AUTOFILTER: Autofilter settings stay with the column number when deleting columns
Summary: EDITING AUTOFILTER: Autofilter settings stay with the column number when dele...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2012-03-29 00:47 UTC by Thomas Thym
Modified: 2021-04-29 17:29 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
File to test / reproduce the bug. (8.44 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-11-22 08:16 UTC, Thomas Thym
Details
Description of the bug with screenshots (35.59 KB, application/vnd.oasis.opendocument.text)
2012-11-22 08:18 UTC, Thomas Thym
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Thym 2012-03-29 00:47:44 UTC
The autofilter criteria remains with the column (e.g. B) when a column left of the column or the column itself is deleted instead of moving with the content (in this case to column A).

How to reproduce:

1. Create a table in calc with 3 colums

Col_A	Col_B	Col_C
a	1	a1
b	2	a2
c	3	a3
a	1	a1
b	2	a2
c	3	1

2. Set autofilter to column B (e.g. "1")

3. Delete column A.

4. The filter setting "1" stays with column B. (The filter is not automatically updated. The tab stays as it was before column A was deleted.)

Expected behaviour:

The filter should stay with the content in this case column "Col_B" (in that case move to column A).

Note: You can't insert columns when the autofilter is used, but you can delete. If would be nice if the solution would not be to also block deleting columns when the autofilter is in use ;-)
Comment 1 sasha.libreoffice 2012-06-22 03:04:08 UTC
Thanks for bugreport
Sorry, can not understand this place:
> 4. The filter setting "1" stays with column B. (The filter is not automatically
> updated. The tab stays as it was before column A was deleted.)
Please, attach screenshot of this problem
Comment 2 bfoman (inactive) 2012-07-03 05:12:32 UTC
Confirmed with:
LO 3.5.4.2 
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Autofilter set on column B, when A is deleted, do not follow to column A, stays at B instead.

(In reply to comment #0)
> Note: You can't insert columns when the autofilter is used, but you can delete.

Confirmed.

Users migrating from Excel 2010 could be surprised.
Comment 3 sasha.libreoffice 2012-07-06 04:45:22 UTC
Still can not reproduce in 3.5.4 on Fedora 64 bit.
It is either Windows specific bug or I doing something wrong.
Please, attach screenshot of this bug
Comment 4 Thomas Thym 2012-11-22 08:16:21 UTC
Created attachment 70414 [details]
File to test / reproduce the bug.

This is the file of the mentioned example to reproduce the bug. I tested is with LibreOffice 3.6.3 on Windows XP (32-bit) and LibreOffice 3.6.1 and 3.6.3 on Linux (OpenSUSE 12.1, 64-bit).
Comment 5 Thomas Thym 2012-11-22 08:18:27 UTC
Created attachment 70415 [details]
Description of the bug with screenshots

I added are more detailed description of the bug, including screenshots. If you need more information I will try to provide it. (And this time quicker.)
Comment 6 sasha.libreoffice 2012-11-22 10:34:49 UTC
Thanks for attachments
reproduced using first attachment and initial description 
in 3.4.2 on Windows XP 32 bit
in 3.6.3 on RFR 17 64 bit
Comment 7 Thomas Thym 2013-03-07 15:27:22 UTC
This bug still exists in LO 4.0.1.2
Comment 8 QA Administrators 2015-02-19 15:39:50 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2015-03-07 14:36:43 UTC
Reproduced with file and instructions provided by Thomas.

Win 7 Pro 64-bit, LibO Version: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: fi_FI
Comment 10 tommy27 2016-04-16 07:23:02 UTC Comment hidden (obsolete)
Comment 11 Arie1 2017-03-14 16:51:46 UTC
This error still exists in the Version 5.2.5.1 release which I have running.
Windows 10 Home.
Comment 12 QA Administrators 2018-06-18 02:41:59 UTC Comment hidden (obsolete)
Comment 13 thatho 2020-03-02 21:02:15 UTC
Bug is still present in

Version: 6.4.1.2 (x64)
Build ID: 4d224e95b98b138af42a64d84056446d09082932
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: cs-CZ (cs_CZ); UI-Language: en-US
Calc: threaded

I created my own test and description:

1. Create a couple of columns and enter data:
col1	col2	col3
1	i	A
0	ii	B

2. Filter (autofilter) col2 for "ii":
col1	col2	col3
0	ii	B

Notice:
* A blue dot appeared at col2 indicating an active filter.

3. Delete column "A":
col2	col3
ii	B
Notice:
* A blue dot vanished at col@ and it appeared at col3 indicating an active filter. Incorrect. Expected: The blue dot stays with col2.
* Open filter for col2 and no options / variables are available for selection. Incorrect. Expected: [ ] i, [x] ii
* Open filter for col3 and all the options / variables are deselected. [ ] A, [ ] B Incorrect. Expected: All variables are pre-selected. [x] A, [x] B

4. Save, close and reopen the file. The situation does not change.
* Blue dot on the wrong place.
* No variables to select in col2
* No variables are selected in col3.
Comment 14 b. 2020-05-19 03:03:51 UTC
still original - buggy - behaviour in: 

Version: 7.0.0.0.alpha1 (x64)
Build ID: 6a03b2a54143a9bc0c6d4c7f1...
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 15 thatho 2020-07-06 21:26:01 UTC
Bug is present in

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 7dc3a20cab712ee987ea25a8f5728529521485b7
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: en-US
Calc: CL
Comment 16 b. 2020-07-07 11:39:17 UTC
after ~8 years ... 

still buggy in 7.1.0.0.a0+ winx64, 

I - bug is affecting only deletion of columns inside the filtered area, if that e.g. starts at col C deletion of col. A or B work cleanly, 

II - if the deletion of column pushes the filtered column of the 'defined range' then the management of the columns somehow gets out of hand, it's mostly not directly possible to re-insert a column in the range, if you manage to do it - e.g. marking a cell and then [alt-s - l - b] - it won't get the filtering condition back into the range ...
Comment 17 b. 2021-04-21 04:59:53 UTC
dear  Tünde Tóth, 

i'm happy to see that someone cares for this issue, 

pls. be aware of, and if time look for, the following bugs which might be related (imho the assignment of the filter parameters is buggy in general, because for the 'direction definition' of a range (by-row or by-column) only one parameter is available, which is used by sort and filter, and (because wrongly set or used) changes at the first save-load cycle, which makes the whole thing very confusing ... ): 

tdf#129105
tdf#132120
tdf#132488
Comment 18 Commit Notification 2021-04-29 10:59:17 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#48025 sc: fix broken filter criteria when deleting columns

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 19 Buovjaga 2021-04-29 17:29:55 UTC
Verified

Arch Linux 64-bit
Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 9224109de3cf2b620ff1165d31e9fb2a4cd680cf
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 29 April 2021