Bug 160470 - CALC: EDITING: Cannot remove or create COLUMNAR data groups when "unrelated" columns contain AUTOFILTERS. Rows work fine
Summary: CALC: EDITING: Cannot remove or create COLUMNAR data groups when "unrelated" ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.9.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2024-04-01 20:38 UTC by Colin
Modified: 2024-07-18 14:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample CALC demonstrating the bug (54.27 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-04-01 20:39 UTC, Colin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin 2024-04-01 20:38:13 UTC
Description:
When a sheet contains an autofilter array which was created after various columns were grouped then the ability to either delete or create new columnar groups is prohibited. Attempting to remove the column groups results in No Operation or warnings whereas the attempt to create a new group asks the irrelevant question "rows or columns" and then rejects the operation with the error message "This function cannot be used with multiple selections".
If a user selects columns by their header then it's unlikely the user is referring to ROWS ie the entire spreadsheet.
Selecting just ONE column is never a multiple selection unless the system is confusing all 1048576 rows in that column as multiple selections
I have not investigated whether the response changes if the Autofiltered array was created before any attempt was made to create columnar groups


Steps to Reproduce:
Using the attached sample file you will observe grouped rows and columns.
Verify that you may add further ROW groups by selecting some contiguous rows and F12
Observe that you may delete those additional groups with [Ctrl]+F12
Now attempt to remove a columnar group by selecting the column headers beneath that group and [Ctrl]+F12.
Observe No Operation
Now select some adjacent columns and attempt to create columnar groups with F12.
Observe and respond "Columns" to the irrelevant question.
Observe the error message.
Left click the histogram and move it to expose the Autofiltered array on row 14.
Select A14:G14 and deactivate the filter - If you have the same ribbon as me this will be highlighted or [Ctrl][Shift]+L will toggle the status.
Removing the Autofilter will permit removal and creation of columnar groups


Actual Results:
Unable to remove or create Columnar Groups

Expected Results:
Ability to remove or create Columnar Groups


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 1 Colin 2024-04-01 20:39:20 UTC
Created attachment 193426 [details]
Sample CALC demonstrating the bug
Comment 2 m_a_riosv 2024-04-02 02:14:09 UTC
The issue is it doesn't ungroup with hidden rows. Click on the top-left of the headers, unhidden rows, now is possible to group and ungroup.
Comment 3 Colin 2024-04-02 04:35:49 UTC
(In reply to m_a_riosv from comment #2)
> The issue is it doesn't ungroup with hidden rows. Click on the top-left of
> the headers, unhidden rows, now is possible to group and ungroup.

It does if the hidden rows don't contain an auto-filter with some dates excluded to minimise the chart clutter. Why would it only fail on Column actions NOT row actions?

You may create a "noughts and crosses" framework of hidden columns and rows to your heart's content but NOT if the autofilter has been activated.

Why should the autofilter exclusion cause a different action to a Group Hide - especially if the autofilter array is 20 columns to the left of the new columnar grouping?

>but NOT if the filter has been activated.

I guess your suggestion to unhide all hidden rows also unhides the autofilter exclusions so it may not be necessary - just "select all" in the filter. I will experiment and re-apprise.

I only discovered this at 23:30 last night as I was building a new sheet by systematically copying the elements.The moment I removed the autofilter it returned to normality.

I relised that I had introduced that feature during January this year - with the grouped columns already in place and not needing "re-focusing" until we entered the 2nd quarter
Comment 4 Colin 2024-04-02 04:51:04 UTC
(In reply to Colin from comment #3)
> (In reply to m_a_riosv from comment #2)
> > The issue is it doesn't ungroup with hidden rows. Click on the top-left of
> > the headers, unhidden rows, now is possible to group and ungroup.
> 

> 
> I guess your suggestion to unhide all hidden rows also unhides the
> autofilter exclusions so it may not be necessary - just "select all" in the
> filter. I will experiment and re-apprise.
> 
Confirmed. Simply clearing the filter permits columnar grouping regardless of the status of row groups. Now the big question is - Should the hidden rows in an autofilter impact the creation or removal of columnar groupings to unrelated columns? - simplified version - Bug or Feature?
Comment 5 Buovjaga 2024-07-16 12:39:16 UTC
(In reply to Colin from comment #4)
> (In reply to Colin from comment #3)
> > (In reply to m_a_riosv from comment #2)
> > > The issue is it doesn't ungroup with hidden rows. Click on the top-left of
> > > the headers, unhidden rows, now is possible to group and ungroup.
> > 
> 
> > 
> > I guess your suggestion to unhide all hidden rows also unhides the
> > autofilter exclusions so it may not be necessary - just "select all" in the
> > filter. I will experiment and re-apprise.
> > 
> Confirmed. Simply clearing the filter permits columnar grouping regardless
> of the status of row groups. Now the big question is - Should the hidden
> rows in an autofilter impact the creation or removal of columnar groupings
> to unrelated columns? - simplified version - Bug or Feature?

Let's ask UX team.
Comment 6 Heiko Tietze 2024-07-17 11:17:28 UTC
(In reply to Buovjaga from comment #5)
> Let's ask UX team.
Uff ;-)

The reason is a simple filter that blocks to create the outlines in ScDBFunc::MakeOutline(). And filters are only possible for columns.

Now I wonder myself why it is possible to merge cells (eg C7:D9) and group (eg B:C), whereas filtering out one row should not work (although it can be done after grouping). Maybe Mike knows why. 

But anyway, is there a striking use case that makes it necessary to invest effort? Simply removing the check works but I don't oversee the consequences.
Comment 7 Colin 2024-07-17 11:36:02 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Buovjaga from comment #5)

> But anyway, is there a striking use case that makes it necessary to invest
> effort? 

Did you not just answer that yourself?

> Simply removing the check works but I don't oversee the consequences.

Not everybody will figure out the steps to achieve the objective and there's certainly nothing in the documentation to help. It may be a low(ish) priority but the more small bugs that are allowed to accumulate will soon make it intolerable. I'm stuck on;

Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

             because the accumulation of these little inconsequential bugs now dictates that I can't risk destroying years' of work until some of the backlog is cleared enough to attempt to mitigate the risk
Comment 8 Heiko Tietze 2024-07-18 10:00:55 UTC
From UX POV I agree that we ideally should allow function or at least give more specific information why it is prevented (the same message is used at ~20 places).