Bug 107385 - Autofilter sorting breaks rows data alignment without warning
Summary: Autofilter sorting breaks rows data alignment without warning
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2017-04-24 13:02 UTC by Luca
Modified: 2018-12-13 14:33 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca 2017-04-24 13:02:03 UTC
Description:
Autofilter sorting doesn't affect non autofiltered columns, there is no warning, the result is a complete mess up of a spreadsheet.


Big, big mess.

Solution: for the Autofiler function, just copy MS Excel behaviour in every aspect. It's perfect.

Steps to Reproduce:
1) Fill in three columns with sortable data
2) Setup three column labels (let's say A, B, C)
3) Select only A and B column labels (leave the C column out of the selection)
4) Select Data/Autofilter, to setup autofilter labels on A and B, but not C.
5) Click on the A lable
6) Select Sort/Descending (or Ascending, depending on how you sorted data in the first place)


Actual Results:  
Only the A and B column get sorted, while the C column sticks to the original sorting. Raws data alignment is broken. Big mess. 

Then: 
7) Select a cell in the C column
8) Select Data/Sort...

Autofilter labels on A and B columns get lost.

Expected Results:
Just copy MS Excel behaviour. It's perfect. 
- Raws alignment should never be broken without warning
- Autofilter labels should never disappear after a sorting operation 
- Sorting should always affect either the whole spreadsheet, or the selected columns/group of cells.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Cor Nouws 2017-04-24 13:37:40 UTC
Users always have the freedom to create a mess ;)
But you propose a warning such as
 "You've set a filter for rows XYZ, that you are now going to use.
  Mind that the row AB next to it, is not included and will be left out of
  the action.
  Do you want to continue or do you want to extend the filter to include
  column AB?
   [continue] [adapt filter]   [] do not show this warning again"

?
Comment 2 Cor Nouws 2017-04-24 13:38:48 UTC
/me a bit worried about all other areas and scenarios that we 'should' cover with like wise warnings..
Comment 3 Luca 2017-04-26 10:41:41 UTC
(In reply to Cor Nouws from comment #1)
> Users always have the freedom to create a mess ;)

Nope. Please, go to step 4, then try selecting whichever area you want (column, group of cells, or select all) then apply step 5 and 6, look what happens. You have no control whatsoever on the area to be sorted: sorting always applies to all columns with the autofilter label, and never to the other columns, no matter which area you selected before sorting. So, if you wanted to create *your* mess, you couldn't. It's the program that *always* create the mess of its own choice. 

> But you propose a warning such as
>  "You've set a filter for rows XYZ, that you are now going to use.

Nope. I've set a sorting order, not a filter. The behaviour of the function here should be coherent with the Data | Sort ascending and Data | Sort descending functions behaviour.

>   Mind that the row AB next to it, is not included and will be left out of
>   the action.

Nope. I've set a sorting order for column A, either all columns should be affected, or just column A. Warnings and selection extensions should be exactly the same as for Data | Sort ascending and Data | Sort descending.

>   Do you want to continue or do you want to extend the filter to include
>   column AB?
>    [continue] [adapt filter]   [] do not show this warning again"
> 
> ?

Nope. I just don't want to have *two* different sorting function, with two different and incoherent behaviours, one of them always breaking records by design, and without warning. 

I don't like MS Excel, and I don't use it, bit this is very very bad design in LibreOffice.
Comment 4 Roman Kuznetsov 2018-12-13 14:33:37 UTC
it isn't a bug but expected behaviour.

Eike, may be you have some opinion about this?