Bug 95161

Summary: EDITING: Date field in embedded form displays unexpected value
Product: LibreOffice Reporter: libreoffice
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: iplaw67
Priority: medium    
Version: 5.0.2.2 release   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:

Description libreoffice 2015-10-18 20:43:42 UTC
I am using a custom Open/LibreOffice Base application with sub-forms or embedded forms (don't know the proper terminology). The forms are linked to a mysql database.

I have used this application for 10 years in various versions of OpenOffice (until version 4.0) and LibreOffice (since version 4.3). 

The main from displays customer data while the embedded forms show the invoices and products related to the customer.

Since upgrading from LO 4.3.x to 5.0.0.5 I have a new issue with date fields in embedded forms. Please note that this has not been an issue with the application in earlier versions of LO and OO. 

The fields display the proper dates until I click on the field for editing. At that point, the displayed value changes to something unpredictable. At least I have not been able to see a pattern, except that all fields in a column seem to display the same value when editing. 

This is troublesome, as it makes it much harder to change a date by notching up a month or a year as the original value is no longer visible when editing.

The issue does not change when I change from the native mysql connector to the jdbc connector vice versa.

As of yet I have not found this issue in the bug database. Therefore I submit this bug report. I have yet to write the procedure to reproduce this issue. Just submitting as is right now, in the hope that someone else has encountered the same issue.
Comment 1 libreoffice 2015-10-18 21:32:05 UTC
Some more information. 

1) I have upgraded to LO 5.0.2.2. No difference

2) There is a logic to the value that is displayed when clicking the date field in the subform. The date that is displayed in the date field in the subform when the field is clicked for editing, is the value of the -previous- record in the main form. 

Example:

Main form record 1: Client 1
Subform record 1: Product registration date 10-02-2015

Main form record 2: Client 2
Subform record 2: Product registration date 15-03-2015 (displayed correctly)

But: when the date field (in Subform record 2) is clicked, the value changes to 10-02-2015 (which is the registration date of the product of Client 1).
Comment 2 Alex Thurgood 2015-10-20 08:29:59 UTC
Please try a nightly build, as this report rings a bell with regard to a previous report which I think has been fixed (only I can't find it right now)
Comment 3 libreoffice 2015-10-20 09:25:09 UTC
A quick test with a nightly build indicates that the issue is no longer present in this build:

Version: 5.1.0.0.alpha1+
Build ID: 97a27b1746286a62c4ac032683a4d9d3df5bd399
TinderBox: Win-x86@39, Branch:master, Time: 2015-10-20_06:28:22

Good news.
Comment 4 Alex Thurgood 2015-10-20 09:48:10 UTC
I would put FIXED, but that requires pinpointing the commit that fixed this. As I said, I'm pretty certain that this is a DUP of the previous and now fixed with a commit bug report, but can't find it anymore.

Setting to RESOLVED WFM