Bug 122319 - List boxes set to "input required" shouldn't offer NULL for input
Summary: List boxes set to "input required" shouldn't offer NULL for input
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-25 11:08 UTC by Robert Großkopf
Modified: 2022-10-05 13:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Open the form and have a look to both listboxes - one offers NULL, the other not. (11.62 KB, application/vnd.oasis.opendocument.database)
2018-12-25 11:08 UTC, Robert Großkopf
Details
Screenshot of both listboxes (without and with NULL for input) (4.43 KB, image/png)
2018-12-25 11:09 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2018-12-25 11:08:34 UTC
Created attachment 147813 [details]
Open the form and have a look to both listboxes - one offers NULL, the other not.

If you create list boxes in forms the first row in list boxes will be empty for setting NULL to the field of the data source of the form.

You could switch this behaviour when setting "Entry required" while editing the table. You can't set this by setting "Input required" in the properties of the list box. The setting of "Input required" is completely ignored while creating the list.

See the attached image and the attached database.
Open the form of the database.
List boxes for "Transfer from" and "Transfer to" are both set to "Input required" > 'Yes'. For "Transfer from" the field is set in the table to "Entry required".
First List box doesn't offer NULL, second list box does.

Expected behaviour: Both list boxes shouldn't offer NULL, because input is set to "required".
Comment 1 Robert Großkopf 2018-12-25 11:09:50 UTC
Created attachment 147814 [details]
Screenshot of both listboxes (without and with NULL for input)
Comment 2 Drew Jensen 2018-12-27 15:48:48 UTC
Using Ubuntu 18.04.1 (AMD64) and LO 6.2.1 RC1 

Confirmed that controls ignore the setting "Input required" available in the GUI - rather the property of the attached data field determines whether a NULL entry will be made available in the list control. 

Have changed the version back to 5.4.7, though I believe it is actually inherited from OpenOffice.org days. I did not select that however as it appears HSQL based files, created with the latest LO are no longer fully backward compatible with Apache OpenOffice (not with 4.1.6 at least). Not everything is broken but list boxes seem to be.
Comment 3 QA Administrators 2020-12-27 03:37:27 UTC Comment hidden (obsolete)
Comment 4 Robert Großkopf 2020-12-27 07:03:07 UTC
Bug is almost the same with LO 7.1.0.1 on OpenSUSE 15.2 64bit rpm Linux.
Comment 5 Commit Notification 2022-10-05 13:32:16 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7c1a8152889fe38d961f8f605713c44293920a28

tdf#122319 - Don't allow nullable form components if input is required

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.