Bug 121188 - forms controls are created with "input required" set to yes by default
Summary: forms controls are created with "input required" set to yes by default
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.3.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords:
: 120289 120353 120712 121475 121921 122089 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-06 07:29 UTC by andreas.bergmann
Modified: 2022-08-24 09:27 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Text database (13.44 KB, application/vnd.oasis.opendocument.database)
2018-12-14 16:57 UTC, Silvain Dupertuis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreas.bergmann 2018-11-06 07:29:52 UTC
Since the last update, when I entered a new dataset, all fields have to be filled out. If not an error occurs. The field property "needed" is ignored.
Comment 1 Xisco Faulí 2018-11-06 09:53:25 UTC
Thank you for reporting the bug.
Unfortunately without clear steps to reproduce it, we cannot track down the origin of the problem.
Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Comment 2 andreas.bergmann 2018-11-06 10:05:55 UTC
Step 1: Create a database table with some fields, set all fields "not needed"
Step 2: Create a form and connect the form fields with the data fields
Step 3: Create a database set and leave one or more fields empty
Comment 3 Alex Thurgood 2018-11-06 10:53:13 UTC
This is a DUP of a bug that was supposed to have been fixed in 6.1.3 - guess not !
Comment 4 Alex Thurgood 2018-11-06 11:07:30 UTC
Indeed, supposed to have been fixed by:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8dbcd72f83e2317dd40c0fa605fd26b3f6a2616b&h=libreoffice-6-1

*** This bug has been marked as a duplicate of bug 120245 ***
Comment 5 Xisco Faulí 2018-11-06 11:10:02 UTC
Dear Andreas Bergmann,
LibreOffice 6.1.3.2 was released yesterday. Please update LibreOffice to this version. You can download it from from https://www.libreoffice.org/download/libreoffice-fresh/
Comment 6 Lionel Elie Mamane 2018-11-06 15:52:52 UTC
This does not look like a DUP of bug 120245. The latter was about a specific set of circumstances, this is for _all_ fields, _always_.

This problem is only with forms, and is created by the property of the _control_, nothing to do with the database. The "input required" property became "true" by default. That's what we have to chase.

Work-around: edit the form, go over each control (that should not force non-empty content) and set its "input required" property to false.
Comment 7 Lionel Elie Mamane 2018-11-06 16:01:46 UTC
This looks like a very old bug that is exposed by the fix to bug 75341.

Before that, the form control's "input required" was actually ignored as soon as the column allowed NULLs. Now it is not ignored anymore.

The bug is that form controls are always created with "input required" set to true by default. It should be:
 * quick fix: always false by default
 * better fix: true if the column is "NOT NULL"
   (i.e. rColInfo.nNullable == ColumnValue::NO_NULLS )
   else false
 * even better fix: true if the column is "NOT NULL" _and_
   does NOT have a default value, else false
Comment 8 Alex Thurgood 2018-11-06 16:10:36 UTC
(In reply to Lionel Elie Mamane from comment #6)


> 
> Work-around: edit the form, go over each control (that should not force
> non-empty content) and set its "input required" property to false.


I thought someone recently posted a link to a macro to do this for existing forms in ODB files, but I can't remember where I saw it (user mailing list ??)
Comment 9 Alex Thurgood 2018-11-06 16:14:04 UTC
Hmm, no link, but the reporter in bug 120712 (also marked as a DUP of 12025, my bad) indicated that this is what they had done to work around the problem with their forms.
Comment 10 Alex Thurgood 2018-11-06 16:15:27 UTC
It is I suppose thus plausible that this report is a duplicate of 120712 instead ?
Comment 11 Lionel Elie Mamane 2018-11-06 16:34:46 UTC
*** Bug 120712 has been marked as a duplicate of this bug. ***
Comment 12 Lionel Elie Mamane 2018-11-06 16:35:52 UTC
(In reply to Alex Thurgood from comment #10)
> It is I suppose thus plausible that this report is a duplicate of 120712
> instead ?

That is exactly right. However, since we started discussing in this bug, I marked it the other way round.
Comment 13 Lionel Elie Mamane 2018-11-06 17:46:03 UTC
Solved (patch in gerrit) for *new* form controls.

Old forms have to be fixed...
Comment 14 Commit Notification 2018-11-06 18:15:37 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/fec8c14e960fbcd639a04d6c3354caff2d0bd365%5E%21

tdf#121188 form controls should have InputRequired false by default

It will be available in 6.2.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 15 Commit Notification 2018-11-09 16:16:39 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/17c87566e84ac433645f264a9bee4cb5ddbd23a5%5E%21

tdf#121188 form controls should have InputRequired false by default

It will be available in 6.1.4.

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 16 Alex Thurgood 2018-11-20 10:53:41 UTC
*** Bug 121475 has been marked as a duplicate of this bug. ***
Comment 17 Drew Jensen 2018-12-05 15:26:30 UTC
*** Bug 121921 has been marked as a duplicate of this bug. ***
Comment 18 Drew Jensen 2018-12-14 12:04:43 UTC
*** Bug 122089 has been marked as a duplicate of this bug. ***
Comment 19 Silvain Dupertuis 2018-12-14 16:57:06 UTC
Created attachment 147560 [details]
Text database

DateBase with one form and one button to check the MsgBox Dialog
Comment 20 Mike Kaganski 2022-08-24 09:23:38 UTC
*** Bug 120289 has been marked as a duplicate of this bug. ***
Comment 21 Mike Kaganski 2022-08-24 09:24:55 UTC
*** Bug 120353 has been marked as a duplicate of this bug. ***
Comment 22 Mike Kaganski 2022-08-24 09:27:48 UTC
(In reply to Commit Notification from comment #15)
> https://git.libreoffice.org/core/+/
> 17c87566e84ac433645f264a9bee4cb5ddbd23a5

Aha, this seems to indicate that fixing bug 150577 will not cause new round of the same trouble. Only fields manually, explicitly set to require input, will start require it.