Bug 141893 - Sorting data filtered with No Duplicates shows duplicates again (see comment 3)
Summary: Sorting data filtered with No Duplicates shows duplicates again (see comment 3)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.5.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-25 14:32 UTC by Colin
Modified: 2022-04-30 13:17 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Simple sheet demonstrating the effect (15.08 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-04-25 14:33 UTC, Colin
Details
Simple example sheet (14.95 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-07-03 08:32 UTC, Colin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin 2021-04-25 14:32:02 UTC
Description:
Firstly, I'm not even certain how much of the effect is planned and how much is anomalous. I was experimenting with Advanced Filters.
It seems to be imperative that the entire data array is pre-selected prior to then selecting it within the advanced filters.
It also requires the "AutoFiltered" label to be included within the selection or the process fails to complete.
The eventual deduplicated list is impacted by SOME changes made to the source and, following deletion, will reappear after further manipulation of the source.
The effect is persistent, surviving file saves & reloads until the deduplicated column is deleted and the file saved.
Deselecting items in the source autofilter impacts the deduplication list but NOT the source list. Deletions of all instances of a data event in the data in the source list has no impact on the deduplicated list.
Amending the data in the source list has no impact on the deduplicated list but does manifest in the source autofilter contents.
I don't know how many - or if any - of the "effects" are an integral part of the procedure. I feel a bit like a magician pulling rabbits from a hat - somebody else's hat!
Perhaps I shouldn't have placed the de-duplicated list adjacent to the filter list. I'm aware that placing two discrete autofilters alongside each other is not possible as the second event simply disables the first.
Perhaps I shouldn't even have placed it on the same sheet.
If I selected and moved the deduplicated list to a second sheet the link was broken but further manipulation of the source list simply made it reappear in its original location.
I did not check to see if I could create the list on an alternate sheet so I am unable to comment on the potential impact.
I did not experiment with cutting and pasting or moving within the same sheet.

Steps to Reproduce:
1 Create a list of 8 unique events at B:4 and then replicate them 5 times.
2 At B:3, create a label "Events" and an AutoFilter from the toolbar using the "Events" label
3 Mouse select the label and all events
4 Data>More Filters>Advanced Filter

Observation - the process fails if the selected column of data - step 3 - doesn't include the label "Events" or has NOT previously been selected/focused prior to 4&5

5 From within the little Advanced filter pane AGAIN select the entire data column - NOT the column in its entirety
6 Expand >options
7 Select >No duplicates
8 Select >Copy results to
9 Mouse select E:3 which is conveniently adjacent to the Filtered List commencing B3
As demonstrated, there is a filtered no de-duplicated list with a nice label but inactive autofilter symbol  Should the symbol even be reproduced?
10 sort "Events" Descending --- NO observable impact upon Array E3:E11
11 Deselect Event 1 & Event 2 from the "Events" list --- Observe the de-duplicated list is amended
12 "PLAY" with any of the sort, deselect, reselect functions in the "Events" filter list --- Observe that selection and deselection impact Array E3:E11
13 Select & Delete column E In its entirety --- Observe that array E3:E11 no longer exists
14 Deselect anything in "Events" filter list and --- Wow, Where did that come from?
15 Repeat 12 ONLY
16 Save and Exit or Exit and Save
17 Reload the file
18 Repeat 10, 11, 12 & 13 - Observe that array E3:E11 no longer exists
19 Save & Exit or Exit and Save 
20 Reload the file Wow, There it was GONE!

Don't panic, you can always re-download the source file to recreate the demo

Actual Results:
The deduplicated list remains actively attached to the source, surviving deletions and file saves, reappearing following further manipulation of the source. It is also surprising that the source data and AutoFilter label must be actively focused prior to the event and actively selected again during the event.

Expected Results:
I anticipated the list being set in stone and the requirement for selection being a one-time operation


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Module: SpreadsheetDocument

Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded
Comment 1 Colin 2021-04-25 14:33:00 UTC
Created attachment 171403 [details]
Simple sheet demonstrating the effect
Comment 2 Colin 2021-04-25 14:41:00 UTC
Typo:

As demonstrated, there is a filtered no de-duplicated list with a nice label but inactive autofilter symbol  Should the symbol even be reproduced?

Should read;
As demonstrated, there is a filtered de-duplicated list with a nice label but inactive autofilter symbol  Should the symbol even be reproduced?
Comment 3 Colin 2021-07-03 08:30:16 UTC
To enhance the report I have added another example file containing 2 sheets which I perceive is a more definitive example of the issue. The second sheet contained therein is just a duplicate for "control" data.

To recreate the issue:-

In Sheet 1 "Filter error"

Marquee Select B2:B88
Activate B2 "filter" chevron
Select "standard filter"
Expunge "field name" - top selection to leave "none"
Activate "options"
Select "No-duplicates" AND ensure "Range contains column labels" is enabled
select "OK"

Observe the list now contains 23 deduplicated elements

Select any cell to deactivate focused cells
Activate "filter chevron"
Sort Ascending

Observe the entries no longer reflect the deduplicated list and contain duplicates - sorted ascending.

"undoing" last actions to reverse everything re-establishes the original values

If the "field name" is not expunged then the results are an empty array list which in itself seems quite an anomalous response
Comment 4 Colin 2021-07-03 08:32:32 UTC
Created attachment 173326 [details]
Simple example sheet

I believe it complements, not replaces the original example sheet but please feel free to reassess and take whatever action you deem appropriate.
Comment 5 Colin 2021-07-03 08:34:29 UTC
(In reply to Colin from comment #4)
> Created attachment 173326 [details]
> Simple example sheet
> 
> I believe it complements, not replaces the original example sheet but please
> feel free to reassess and take whatever action you deem appropriate.

Sorry, forgot to mention, my version has been updated

Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded
Comment 6 Buovjaga 2022-04-29 15:48:35 UTC
(In reply to Colin from comment #0)
> Steps to Reproduce:
> 1 Create a list of 8 unique events at B:4 and then replicate them 5 times.
> 2 At B:3, create a label "Events" and an AutoFilter from the toolbar using
> the "Events" label
> 3 Mouse select the label and all events
> 4 Data>More Filters>Advanced Filter
> 
> Observation - the process fails if the selected column of data - step 3 -
> doesn't include the label "Events" or has NOT previously been
> selected/focused prior to 4&5
> 
> 5 From within the little Advanced filter pane AGAIN select the entire data
> column - NOT the column in its entirety
> 6 Expand >options
> 7 Select >No duplicates
> 8 Select >Copy results to
> 9 Mouse select E:3 which is conveniently adjacent to the Filtered List
> commencing B3

Using your attachment 171403 [details], I removed the AutoFilter from B3 and created it again. At this step 9, when I click OK, I get this warning and nothing happens:

This range does not contain a valid query.

It focuses me to the Read Filter Criteria From field, where I have $Sheet1.$B$4:$B$46

Please advise.

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 3a4a12b3801b0b88d119c6e7aaca1e183f7e470f
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 29 April 2022
Comment 7 Colin 2022-04-29 20:09:52 UTC
(In reply to Buovjaga from comment #6)
> (In reply to Colin from comment #0)
> > Steps to Reproduce:

> Using your attachment 171403 [details], I removed the AutoFilter from B3 and
> created it again. At this step 9, when I click OK, I get this warning and
> nothing happens:

This was superceded by comments 3 & 4 with new procedures for the new attachment 173326 [details] but I'm also not certain why you have removed and recreated the AutoFilter for which you appear to have experienced a different error from that which I reported.

> Arch Linux 64-bit
> Version: 7.4.0.0.alpha0+ / LibreOffice Community
> Build ID: 3a4a12b3801b0b88d119c6e7aaca1e183f7e470f
> CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: fi-FI (fi_FI.UTF-8); UI: en-US
> Calc: threaded Jumbo
> Built on 29 April 2022

I'm using Windows 10 and now on LO 7.2.6.2. I'm unsure what would happen to either attachment under Linux but I will conduct further testing of your modified procedure for a comparison of both attachments. I can't do it immediately.
Comment 8 Buovjaga 2022-04-30 13:13:25 UTC
Ok, I thought it was a bonus as you said "I believe it complements, not replaces the original example sheet".

With the steps from comment 3, I can reproduce with 7.0, but not with new versions. There were many fixes to the filtering functionality since 7.0.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 83d0f2eebae41d431d9a5bfd1a918523977752d0
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded Jumbo
Comment 9 Colin 2022-04-30 13:17:00 UTC
(In reply to Buovjaga from comment #8)

> 
> With the steps from comment 3, I can reproduce with 7.0, but not with new
> versions. There were many fixes to the filtering functionality since 7.0.
> 
That certainly saves me some effort - Thanks