Bug 143198 - Cell Range Data Validity Doesn't Work Properly For A Selected Set Of Cells
Summary: Cell Range Data Validity Doesn't Work Properly For A Selected Set Of Cells
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-05 09:57 UTC by lcuserx
Modified: 2021-11-10 12:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Try selecting the fruits under the Selection column - only the first one will work (8.35 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-07-05 09:57 UTC, lcuserx
Details
Modified Version of Reporters's Testcase (35.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-07-05 11:33 UTC, [REDACTED]
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lcuserx 2021-07-05 09:57:32 UTC
Created attachment 173364 [details]
Try selecting the fruits under the Selection column - only the first one will work

Hi!

The Data->Validity feature for cell ranges doesn't seem to work properly. I'm using LibreOffice v6.4.7.2 with build 1:6.4.7-0ubuntu0.20.04. I attached an example what I made with Libreoffice Calc. The spreadsheet works fine with OnlyOffice Desktop Editors and Excel.
Comment 1 [REDACTED] 2021-07-05 11:19:21 UTC
The validity was defined "Fruits.A2:A10000" for cell "A2". Obviously the cell validity was copied down to cell "A3" and due to using a relative addressing scheme the validity range turns top "Fruits.A3:A10001" as per general rules and behavior. But is was expected to stay at "Fruits.A2:A10000". This proceeds until there is no value an longer in the validity list (cell "A7" and validity range being "Fruits.A7:A10005"). To achieve the intended behavior you need to use an absolute adrdessing scheme using "$": 
- Add "Fruits.A$2:A$10000" as validity for "A2" 
- Copy cell "A2" down to get the correct validity expression for subsequent rows

[1] LibreOffice Help - Addresses and References, Absolute and Relative: https://help.libreoffice.org/latest/en-US/text/scalc/guide/relativ_absolut_ref.html?DbPAR=CALC#bm_id3156423

From my perspective not a bug.
Comment 2 [REDACTED] 2021-07-05 11:33:33 UTC
Created attachment 173366 [details]
Modified Version of Reporters's Testcase

Please see the attached modification of the original testcase file, which uses an absolute addressing scheme for the validity range.
Comment 3 lcuserx 2021-07-05 11:35:02 UTC
@Uwe Auer calc shouldn't extend data sources because it doesn't make any sense. Other spreadsheets don't have this bug. The range was added through selection so maybe the issue is in the selection system.
Comment 4 lcuserx 2021-07-05 11:37:26 UTC
I tried your sample and that is how it works in other spreadsheet programs. Also, after I select something from the list and switch to another sheet the selection will become available once for cells without validity rules.
Comment 5 [REDACTED] 2021-07-05 14:30:21 UTC
Feel free to reopen...
Comment 6 lcuserx 2021-07-05 14:33:24 UTC
Is it a goal to match the other spreadsheets' functionality, like the range selection and usage mechanism?
Should I create another report for the lingering drop-down?
Comment 7 Xisco Faulí 2021-11-08 16:13:42 UTC
I guess some input from the UX team would be great
Comment 8 Heiko Tietze 2021-11-10 08:14:35 UTC
(In reply to lcuserx from comment #3)
> Calc shouldn't extend data sources because it doesn't make any
> sense. Other spreadsheets don't have this bug. 

You mean we should always use absolute references by default? And other spreadsheet tools behave respectively? Clearly not.

And if you select the source per range selector (the button right of the input field) you do get absolute references ($Fruits.$A$2:$A$6) that wont change on copy/paste. Don't see an issue here.

What exactly do you suggest to change?
Comment 9 lcuserx 2021-11-10 08:44:21 UTC
(In reply to Heiko Tietze from comment #8)
> (In reply to lcuserx from comment #3)
> > Calc shouldn't extend data sources because it doesn't make any
> > sense. Other spreadsheets don't have this bug. 
> 
> You mean we should always use absolute references by default? And other
> spreadsheet tools behave respectively? Clearly not.
> 
> And if you select the source per range selector (the button right of the
> input field) you do get absolute references ($Fruits.$A$2:$A$6) that wont
> change on copy/paste. Don't see an issue here.
> 
> What exactly do you suggest to change?

I say yes for both of the first two questions.
Comment 10 Heiko Tietze 2021-11-10 08:54:51 UTC
(In reply to lcuserx from comment #9)
> (In reply to Heiko Tietze from comment #8)
> > You mean we should always use absolute references by default? And other
> > spreadsheet tools behave respectively? Clearly not.
> ...
> I say yes for both of the first two questions.

That's a no-go. Relative addresses are common on all spreadsheet tools. And even if some weird program behaves differently, the majority of users would see it as a regression.

Please also note that using the dialog's range function does add absolute references for the validity. So it's NAB (since you reopened I don't touch the status).
Comment 11 lcuserx 2021-11-10 12:18:33 UTC
(In reply to Heiko Tietze from comment #10)
> (In reply to lcuserx from comment #9)
> > (In reply to Heiko Tietze from comment #8)
> > > You mean we should always use absolute references by default? And other
> > > spreadsheet tools behave respectively? Clearly not.
> > ...
> > I say yes for both of the first two questions.
> 
> That's a no-go. Relative addresses are common on all spreadsheet tools. And
> even if some weird program behaves differently, the majority of users would
> see it as a regression.
> 
> Please also note that using the dialog's range function does add absolute
> references for the validity. So it's NAB (since you reopened I don't touch
> the status).

I opened this ticket because the default behavior is not the same as it is in excel/onlyoffice and produces incorrect results. Whether you want to correct this or not is your choice and won't affect me because I'm not using Calc anymore.