Bug 162713 - Changed format for date-field and time-field in tablecontrol of a form won't be saved
Summary: Changed format for date-field and time-field in tablecontrol of a form won't ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
24.8.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2024-08-30 15:20 UTC by Hans Zekl
Modified: 2024-10-04 08:33 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the form of the database for editing. Try to change format for "StartDatum" and "Zeit". (165.28 KB, application/vnd.oasis.opendocument.database)
2024-08-31 14:00 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Zekl 2024-08-30 15:20:31 UTC
Description:
I have an older Base application (8 years) with a window where date are presented in a tabular form. Two colums are defined with format hh:mm:ss and dd.mm.yyyy respectively- Every time when I open the form nn version 24.8.0.3. the data are present with formats hh:mm and dd.mm.y respectively.

I can change this by clicking on the column header and choosing the correct format. But the presentation of the time data change only when I select another column. This is a minor subject. 

More serious is the behaviour of the data column. Changing the format to dd.mm.yyy results in mm.dd.yyyy. The German format is ignored.

I can change the formats in the development mode. Saving the changes in the dev-mode and in the main window of LibreOffice and then going back to the working mode, everything is fine.

But closing LibreOffice ad restarting the application, all format changes are lost.

My system: Windows 10, 64-bit, latest update

Steps to Reproduce:
1.See description
2.
3.

Actual Results:
Format changes of time and date colums are lost after restart LibreOffice

Expected Results:
Format changes of date and time fields showed be kept.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
Comment 1 Robert Großkopf 2024-08-31 09:49:42 UTC
(In reply to Hans Zekl from comment #0)
> Description:
> I have an older Base application (8 years) with a window where date are
> presented in a tabular form.

Do you mean "table" or "form"?

Tested with a table. Changed Date from dd.mm.yy to dd.mm.yyyy. Saved the database, closed LO, reopened LO → Date is shown as dd.mm.yyyy.

Then tested to change time from hh:mm to hh:mm:ss. Saved the database, closed LO, reopened LO → Time is shown as hh:mm:ss.

What I have seen sometimes: Format has been lost while saving database and must be set again for the table.

Tested with
Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 2 Hans Zekl 2024-08-31 12:32:07 UTC
Hallo Robert,

I mean a form.

An image of it (with the correct formats) is available here:

https://magentacloud.de/s/mXxNCnNxTp6ex5b

Gruß
Hans
Comment 3 Robert Großkopf 2024-08-31 13:16:11 UTC
There could be created different fields in a form.

Please add a little example without private data. So it could better be reproduced.
Comment 4 Robert Großkopf 2024-08-31 14:00:53 UTC
Created attachment 196137 [details]
Open the form of the database for editing. Try to change format for "StartDatum" and "Zeit".

Open the database and open the form for input data.
There is a field "StartDatum", which if formatted as 'dd.mm.yy'.
Field should be formatted as the screenshot shows for older versions up to LO 24.2.5.2 as 'dd.mm.yyyy'.
You could choose this format, save the form and restart the form for input data. Format hasn't been saved.
Same behavior for field "Zeit", which should be 'hh:mm:ss' but won't be saved in this form.

If format has been saved in LO 24.2.5.2 it will be shown right in LO 24.8.0.3, but if you try to save the form in LO 24.8.0.3 the format will be lost.

Bug appears in
Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 5 Hans Zekl 2024-08-31 15:45:18 UTC
Your example shows the same behaviour I observed!

In the meantime I did some additional tests:

On my laptop version 24.2.5 is installed. There I opened my Base file and it showed the wrong formats. In draw mode I corrected them and after this everything was ok.

On my desktop pc I deinstalled LibreOffice and reinstalled version 24.2.5. Everything was fine. Then I repeated the update to 24.8.0.3 and everything looked good. But I did not try to change the formats.

How the wrong formats came into the file I do not know.

If you need some additional testing, please ask my.

Regards
Hans
Comment 6 Hans Zekl 2024-09-24 13:28:41 UTC
In version 24.8.1.2 the problem is even worse. The date format is always wrong: mm.dd.yyyy

I tried to increase a column with decimal values from 3 digits after the decimal point to 4. Base shows four digits behind the point, but the last digit is always zero (0). Changing the format by clicking the column header results in a weird behaviour. Defining 4 digits results in something like 123.45 instead of 123.4567. Changing to 5 digits results in 1.23+2.

I think the severity level should be increased.

Thanks
Hans
Comment 7 raal 2024-09-24 15:53:22 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.8.
Adding Cc: to Noel Grandin ; Could you possibly take a look at this one?
Thanks
 db32dde207baa78a4fe497fa2d9a911be62e6e40 is the first bad commit
commit db32dde207baa78a4fe497fa2d9a911be62e6e40
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Tue May 14 15:57:12 2024 +0200

    source 9c92eb6800468de34c5aec3690c1b990a4e763c9

167619: createFromAscii -> OUString literals in OLimitedFormats | https://gerrit.libreoffice.org/c/core/+/167619
Comment 8 Commit Notification 2024-10-01 17:34:39 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/54fa4c438bd458d72a8e23a6819c7be639eaee92

tdf#162713 Changed format for date-field and time-field in form

It will be available in 25.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 9 Commit Notification 2024-10-04 08:33:20 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/3e5c424a5b2a2739dd4a50bfc14ac350b9638837

tdf#162713 Changed format for date-field and time-field in form

It will be available in 24.8.3.

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.