https://bugs.documentfoundation.org/show_bug.cgi?id=104375
Bug ID: 104375
Summary: Default dates in table creation incorrect
Product: LibreOffice
Version: 5.2.3.3 release
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: [email protected]
Reporter: [email protected]
Description:
Tested with:
Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default;
Locale: en-US (en_US.UTF-8); Calc: group
Also:
Version: 5.4.0.0.alpha0+
Build ID: 150afc29c951d5fc9c40ff8a72f5178c32383f8c
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; VCL: gtk2;
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time:
2016-12-03_01:02:49
Locale: en-US (en_US.UTF-8); Calc: group
This problem deals with default "DATE" field values in Base when creating
tables. Sample attached for reference.
It is also understood that a default value for a table created in Base is
stored in the "content.xml" file of the .odb and not in the database.
Steps to Reproduce:
There are three tables in the sample. Each has the same fields: ID(Integer -
auto increment), NAME(text) and TESTDATE(Date).
In TABLE1 the default date was set to 12/03/16. Upon saving the table and
opening the table in Edit mode this date is now 12/05/16. If you open the
table for data entry, the default date is set to 01/02/12.
In TABLE2 the default date was set to 2016-12-03. Upon saving the table and
opening the table in Edit mode this date is now 12/05/16. If you open the
table for data entry, the default date is set to 01/02/12.
In TABLE3 the default date was left empty.
Actual Results:
If an Alter statement is used to change the date field default (where x = table
number):
Alter Table "TESTx" Alter Column "TESTDATE" set default '2016-12-31'
changes the default value in the DB (view with TABLExSCHEMA Query) but the
default is still set in "content.xml" and that overrides the default in the
database. This can be seen in TABLE2.
In TABLE3 the default was only set in the database and it works OK with the
exception that the only way to see the default value is to display the schema.
Expected Results:
What should happen, the default should not be stored in "content.xml" (doesn't
work correctly anyway) but rather in the DB and the default value in
table->edit should display the default DB value.
Reproducible: Always
User Profile Reset: No
Additional Info:
The temporary solutions for correct default date are as follows:
Don't set in creation but use "ALTER" statement
If already created in embedded DB, delete default & set with "ALTER"
If already created in split DB, delete default in "content.xml" & set
with "ALTER" or delete field and re-establish (neither choice good)
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/54.0.2840.100 Safari/537.36
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs