Bug 132521 - Show information when a range has been defined (applies to Sort, Filter...)
Summary: Show information when a range has been defined (applies to Sort, Filter...)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoFilter Sorting
  Show dependency treegraph
 
Reported: 2020-04-29 14:05 UTC by Nadie Nada Nunca
Modified: 2023-05-10 14:58 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample .ods file showing the bug (29.62 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-04-29 14:06 UTC, Nadie Nada Nunca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nadie Nada Nunca 2020-04-29 14:05:20 UTC
Description:
This has only happened with one particular file so far for me, but it's pretty consistent. Whenever I try to sort my data in that sheet, Calc starts the range in the fifth row unless I'm standing on a border of the data range. It also ends in the wrong column. 

I've made a point of pressing Ctrl+Home every time I want to sort the data. 

It's not (I think) the contents of that fifth row, because the contents change all the time as I sort the data. But it's always the fifth row. (Outside the data range, the row appears completely empty, as it should be.)

This has been happening for years, but only now I took the time to anonymize the data so that I could upload a sample file showing the bug.

Steps to Reproduce:
1. Open the attached sample file.
2. Click on a cell in the middle of the data range.
3. Use Data | Sort. 

Actual Results:
Calc auto-selects the wrong range, starting in the fifth row and ending before the last column with data.

Expected Results:
Calc should select all rows and columns with data, including the header row.


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes
Comment 1 Nadie Nada Nunca 2020-04-29 14:06:03 UTC
Created attachment 160079 [details]
Sample .ods file showing the bug
Comment 2 m_a_riosv 2020-04-29 21:41:23 UTC
First: aquí somos personas voluntarias, ayudar a Nadie jugando al escondite no es muy agradable y tampoco apropiado.

I think the matter is simple, when there is a defined ranga in Menu/Data/Define range, and you are in it when doing a sort, it is used and sort options are keeped for it.
Comment 3 Nadie Nada Nunca 2020-04-29 22:02:33 UTC
(In reply to m.a.riosv from comment #2)
> First: aquí somos personas voluntarias, ayudar a Nadie jugando al escondite
> no es muy agradable y tampoco apropiado.
> 
> I think the matter is simple, when there is a defined ranga in
> Menu/Data/Define range, and you are in it when doing a sort, it is used and
> sort options are keeped for it.

Miguel: no comprendo a qué te refieres con el primer párrafo de tu mensaje, podrías explicar? ("Nadie nada nunca" es el título de un libro de Juan José Saer btw, por si te referías a mi nombre de usuario, que igual no veo qué tiene que ver con la pregunta.)

Regarding your second paragraph, THAT'S IT! I had evidently defined a range by accident starting on row five. I deleted it now and Data | Sort works as expected. Thanks for finding the issue!

This bug is resolved, but I'd like to make a suggestion so that Calc's behaviour in this case is not confusing to the user: when using Data | Sort inside a range that's been defined, the name of the range should appear in the Name Box, instead of just the cells involved. (It's named the "Name Box" for a reason after all.)
Comment 4 b. 2020-04-30 05:27:52 UTC
calc correctly 'marks' the selected target range in the sheet when opening the sort dialog, but that's not the first thing a user looks at and invisible once the range exceeds the visible area. 

having a selection field in the sort dialog, 'apply to:' with options 'sheet', 'automatic range', and a list of data ranges and named ranges in the sheet, would clarify the situation for users. 

and it would be right to display the range name instead of the cell labels as proposed in prev. comment.   

set to enhancement.
Comment 5 Roman Kuznetsov 2020-09-22 19:26:14 UTC
Dear colleagues from the UX-party, what do you think?
Comment 6 Heiko Tietze 2020-09-23 07:34:26 UTC
Don't get it how a two-dimensional range ($A$5:$Q$243 in the sample file) can be used in the column dropdown (guess this is the "name field"). Maybe appended to every column? And it's also not clear how such a "unnamed1:column C" or "column C (unnamed1)" (worse with hello world) information would be more noticeable than the highlighted range itself. 

The similar but less blatant way to show the active range would be to add it to the dialog title like "Sort (using the defined range 'unnamed1')". 

The same applies also other functions such as filtering and probably more dialogs.
Comment 7 Nadie Nada Nunca 2020-09-23 10:29:10 UTC
I think there's a confusion here, Heiko. 

Why are you putting "name field" in quotes, for example? Nobody mentioned a "name field" before you. 

Why are you assuming the range name would have to appear in the "column dropdown" as opposed to a "selection field in the sort dialog" like b. proposed?

Why are you comparing an unnamed column header in the dialog with a highlighted range as if those were two mutually exclusive options? The problem is that BOTH of these things are happening. The range is highlighted and the column header is not shown (because it's outside the range, obviously). 

The problem, as b. says, is that the fact that a range has been automatically selected is hidden from the user. Your proposal is functionally identical to b.'s but somehow you seem to have misunderstood what's been said. 

btw the region I was referring to seems to be named "name box" in OpenOffice https://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Getting_Started/Parts_of_main_Calc_window and "Sheet area box" in LibreOffice. https://help.libreoffice.org/index.php?title=4.2/Calc/Define_Names&Language=en-US&System=WIN&Version=4.2#bm_id4757802 

I guess the nomenclature is not helping.
Comment 8 Heiko Tietze 2020-09-23 10:53:46 UTC
(In reply to Nadie Nada Nunca from comment #7)
> Why are you putting "name field" in quotes, for example? Nobody mentioned a
> "name field" before you. 

|(In reply to Nadie Nada Nunca from comment #3)
| the name of the range should appear in the Name Box
 
> Why are you assuming the range name would have to appear in the "column
> dropdown" as opposed to a "selection field in the sort dialog" like b.
> proposed?

|(In reply to b. from comment #4)
| and it would be right to display the range name instead of the cell labels
| as proposed in prev. comment.   
 
> Why are you comparing an unnamed column header in the dialog with a
> highlighted range as if those were two mutually exclusive options?

Not exclusive but complementary. 

> btw the region I was referring to seems to be named "name box"...
>...
> I guess the nomenclature is not helping.

It is a lot. I thought you talk about the sort dialog but it's the name box. This range is different and defined per Sheet > Named Range. See also the help at [1]. Regarding the difference between the two see [2,3]. The database range can access different sheets while the name box is always about the current sheet only.

[1] https://help.libreoffice.org/latest/en-US/text/scal/01/04070300.html?DbPAR=CALC#bm_id3147264
[2] https://ask.libreoffice.org/en/question/158187/closed-abandoned-calc-named-ranges-v-database-ranges/
[3] https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=10484
Comment 9 Nadie Nada Nunca 2020-09-23 11:15:30 UTC
OK. So, "name box", not "name field". And this is a field, not a column dropdown like in the Sort dialog. We've cleared that out. 

The first link in your comment somehow ends up leading to a Writer help page. 

The distinction between the two types of named ranges... or, better, the FACT that there are two types of named ranges is even more confusing from an end user perspective. In any case I don't see how it applies to this issue. The existence of different types of ranges is irrelevant to the fact that Calc doesn't tell me that I'm inadvertently using one of them.
Comment 10 Heiko Tietze 2020-10-09 08:36:24 UTC
We discussed the topic in the design meeting. While the range is highlighted nicely there might be corner cases where this is out of sight or not obvious enough. And adding a note to the dialog won't hurt too much. Could be something like "Sorting is applied to the currently active range".