It seems Base forms were not properly respecting the 'Input Required' setting on forms. This was corrected in 6.1.3 (and later).
The result of this is that if a database field is defined as optional, but the corresponding form field is marked 'input required', the user is given an error message stating:
"Error writing to the database"
"Input required in field 'xyz'. Please enter a value".
This implies there's a database problem, when there isn't. There's a form problem.
This might not matter much in normal situations, but given the change (correction) in the behaviour of Base, I believe many will be seriously misled by this. The fix can potentially affect hundreds of fields in many, many forms, and can be a lot of work to adjust to. A misleading error message will cause problems, and probably more duplicate issue reports raised unnecessarily.
See also :
@Julien Nabet, Any opinion here?
About "Input required in field 'xyz'. Please enter a value"., it's in https://opengrok.libreoffice.org/xref/core/include/svx/strings.hrc?r=c89a4996#1108
but "Error writing to the database" is nowhere to be seen in Opengrok so don't know where it comes from :-(
AFAIR, the same message is used whether the restriction is in the form or in the database.
Since LibreOffice 6.1.4 (and 184.108.40.206 from somewhere in early December 2018), odb files last saved by earlier versions of LibreOffice will have all form controls set to "Input required: no". See bug 120353 comment 27.
This should massively help to sidestep this.
Giving a different error message when the "input required" bit comes from the form or from the database can still be considered a worthy enhancement.
(In reply to Lionel Elie Mamane from comment #5)
> Giving a different error message when the "input required" bit comes from
> the form or from the database can still be considered a worthy enhancement.
If I understand well, you want to distinguish these 2 cases:
So in function FormController::approveRowChange
3706 OUString sMessage( SvxResId( RID_ERR_FIELDREQUIRED ) );
3707 sMessage = sMessage.replaceFirst( "#", rColInfo.sName );
It would be something like:
OUString sMessage( xFirstControlWithInputRequired?SvxResId( RID_ERR_FIELDREQUIRED _DB):SvxResId( RID_ERR_FIELDREQUIRED_FORM ));
(or reuse RID_ERR_FIELDREQUIRED for DB and change the content to explicitly quote database and add RID_ERR_FIELDREQUIRED_FORM)
Moving to NEW