Bug 151794 - Validity drop-down shows empty value when 'Allow empty cells' is disabled
Summary: Validity drop-down shows empty value when 'Allow empty cells' is disabled
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.5.0 target:7.6.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2022-10-27 20:52 UTC by Piotr Osada
Modified: 2023-02-15 12:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Allow empty cells - DISABLED+empty entry (71.45 KB, image/png)
2022-10-27 21:30 UTC, Piotr Osada
Details
Excel drop-down (120.25 KB, image/png)
2022-10-27 21:31 UTC, Piotr Osada
Details
Calc file (10.24 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-10-27 21:32 UTC, Piotr Osada
Details
Excel (10.30 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2022-10-27 21:33 UTC, Piotr Osada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Osada 2022-10-27 20:52:21 UTC
Description:
In data validity menu 'Allow empty cells' option has no efect (empty values are present in the pick list). Document opened by Excel behaves properly.

Steps to Reproduce:
1) Data -> Validity -> Allow: Cell range (don't show empty values: 'Allow empty cells' is disabled)
2) Set 'Source': that contains empty and non-empty cells.


Actual Results:
Data validity drop-down menu contains empty entry.

Expected Results:
Data validity drop-down menu should not contain empty value, when 'Allow empty cells' is disabled


Reproducible: Always


User Profile Reset: No

Additional Info:
As shown in the attached pictures.
Comment 1 m_a_riosv 2022-10-27 21:29:11 UTC
Reproducible,
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 17dfc9a9da009cc23d2222e3fb4e2cef9c97d581
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 2 Piotr Osada 2022-10-27 21:30:24 UTC
Created attachment 183302 [details]
Allow empty cells - DISABLED+empty entry

Empty entry is present in the list.
Comment 3 Piotr Osada 2022-10-27 21:31:38 UTC
Created attachment 183303 [details]
Excel drop-down

Ignore empty (Ignoruj puste) works correctly.
Comment 4 Piotr Osada 2022-10-27 21:32:29 UTC
Created attachment 183304 [details]
Calc file
Comment 5 Piotr Osada 2022-10-27 21:33:22 UTC
Created attachment 183305 [details]
Excel

Ignore empty cells works correctly.
Comment 6 raal 2022-10-27 21:40:20 UTC
Confirm with Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

and Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: f3a82a8ba51195cf31b0f78164735acc7ebbcd2f
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 7 m_a_riosv 2022-10-27 21:44:20 UTC
First bad for me:
Versión: 6.4.7.2 (x64)
Id. de compilación: 639b8ac485750d5696d7590a72ef1b496725cfb5
Subprocs. CPU: 4; SO: Windows 10.0 Build 19045; Repres. IU: GL; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES Calc: CL

Last working:
Versión: 5.4.7.2
Id. de compilación: c838ef25c16710f8838b1faec480ebba495259d0
Subprocs. CPU: 4; SO: Windows 6.2; Repres. IU: GL; 
Configuración regional: es-AR (es_ES); Calc: CL

On those I have installed to test.
Comment 8 m_a_riosv 2022-10-27 21:48:51 UTC
Sorry @raal I have just tested with portable version (comment#7) and works for me with 5.4.7. Allow to click a blank cell on the drop-down, but no change the previous value of the cell.
Could be different in Win10 that on Linux.
Comment 9 m_a_riosv 2022-10-27 21:54:32 UTC
Well, perhaps it should not be showed in the drop-down. If it is the situation, then it is inherited from OOo.
With LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4.
Shows the blank cells, but selecting one of them doesn't change the cell value.

Since 6.4.7 selecting blank in the drop-down change the cell value to blank.
Comment 10 raal 2022-10-28 09:17:05 UTC
(In reply to m.a.riosv from comment #8)
> Sorry @raal I have just tested with portable version (comment#7) and works
> for me with 5.4.7. Allow to click a blank cell on the drop-down, but no
> change the previous value of the cell.
> Could be different in Win10 that on Linux.

I tried only visibility of blank lines in the combobox. I will try  bibisect:
1) Data -> Validity -> Allow: Cell range (don't show empty values: 'Allow empty cells' is disabled)
2) Set 'Source': that contains empty and non-empty cells.
3) select some value from the list
4) select empty line -> should not be possible

I think it's not original bug, so we can split the bug into two bugs then.
Comment 11 raal 2022-10-28 10:29:50 UTC
(In reply to raal from comment #10)
> 
> I tried only visibility of blank lines in the combobox. I will try  bibisect:
> 1) Data -> Validity -> Allow: Cell range (don't show empty values: 'Allow
> empty cells' is disabled)
> 2) Set 'Source': that contains empty and non-empty cells.
> 3) select some value from the list
> 4) select empty line -> should not be possible

This seems to have begun at the below commit.
Adding Cc: to Justin Luth ; Could you possibly take a look at this one?
Thanks
 3567d00b5e1168affd067330037e062e10b05b2d is the first bad commit
commit 3567d00b5e1168affd067330037e062e10b05b2d
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Thu Jul 27 05:20:04 2017 -0700

    source cb444c17ca2834e53a9c5c797bae765f08e40101

https://git.libreoffice.org/core/+/cb444c17ca2834e53a9c5c797bae765f08e40101
Comment 12 Justin L 2022-10-28 21:22:42 UTC
I see the problem in both the Calc Allow empty cells - DISABLED.ods file and in Excel.xlsx. (I assume that comment 5 means it works in Excel application, not that it works in Calc.)

Proposed fix at http://gerrit.libreoffice.org/c/core/+/142002
Comment 13 Commit Notification 2022-10-28 22:12:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4c8b1fa44d4f49510d3910981e649dcb08bceb36

tdf#151794 sc validate: honor NO_BLANK in Cell range dropdown

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 m_a_riosv 2022-10-30 14:59:33 UTC
Tested
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9cd0f4c2d25462feba0ffcbd906c199273821243
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded Jumbo
Comment 15 Commit Notification 2023-02-15 12:27:32 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5c18849cc682a88c4d341fe4c12a69332140a367

tdf#79571, tdf#151794, tdf#153622: sc: Add UItest

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.