Bug 50478 - EDITING: Form data and defaults
Summary: EDITING: Form data and defaults
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.3 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-29 15:09 UTC by mabajian86
Modified: 2021-03-02 11:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mabajian86 2012-05-29 15:09:36 UTC
Problem description: 

Default value for a column not handled well by form.

Steps to reproduce:
I used the wizard to create a form.  Some fields (columns) have a default value in the database.  When I enter a new record in the form, I do not see the default value.  I can enter data in the field, and navigate among the newly created records.  Later, when I examine the database, all the new records get the default value, not the value entered with the form.

Current behavior:

Default value not displayed in form.  Value entered on form is replaced in database with default value.

Expected behavior:

Default values displayed on form when creating a new record.  Values entered on form override default values.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Comment 1 Robert Großkopf 2012-07-09 15:26:09 UTC
I can't reproduce this. Created a little table and a default-value in the GUI. Then created a form with the wizard. The default-value of the GUI appears. I can change this values. The changing of the values is saved in the table.

My System: OpenSuSE 11.4, 32bit, LO 3.5.5.2
Comment 2 Jochen 2012-08-28 18:43:56 UTC
Hi reporter,

what do you think about "not reproducible"?
Behavior still exists?
Comment 3 Robert Großkopf 2012-08-28 19:36:43 UTC
There are two different definitions of "default value". You could create one in the GUI. But it isn't the same as created with SQL in the database.
One example: If you want to have (as default) the current date, then it could only created by SQL - forms could only define a fixed date.

The default values of the GUI where shown in the GUI and saved, when they are not changed.

The default values of the SQL-code in the database are not shown before saving the data in a form. They are shown after saving the data, when the field in the form has been empty. They have been created at the moment the row has been saved. So this data could not be shown earlier - especially data for time and date.

When I write in a date-field not the date of now, but the field is declared as default = now, then the input in the form is saved correctly in my system (OpenSuSE 11.4, tested with LO 3.3.4 and LO 3.6.1.2 rc)

In my opinion the expected behaviour "Default values displayed on form" could be a wished enhancement - but not for date or time. The expected behaviour "Values entered on form override default values." is, what I can confirm - this works for me. And this would be a problem, if this doesn't work right.

An attachement with a database, which shows this in the way mabajian86 wrote could be helpful. I have set the status to "Needinfo"
Comment 4 Jochen 2012-09-15 15:48:01 UTC
Probably no bug. Reporter don´t answer.
Changed status to "RESOLVED WORKSFORM"