Download it now!
Bug 82151 - VIEWING: subform link to master fields never updated (subforms always displays data of *first* master row)
Summary: VIEWING: subform link to master fields never updated (subforms always display...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:4.4.0 target:4.3.2
Keywords:
: 81976 82454 82549 82720 82884 82905 83629 83713 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-04 21:17 UTC by Alex Kempshall
Modified: 2014-09-11 19:44 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
This file demonstrates correct function in 4.2.4 and incorrect in 4.3 (16.02 KB, application/vnd.oasis.opendocument.database)
2014-08-04 21:40 UTC, Alex Kempshall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kempshall 2014-08-04 21:17:43 UTC
Since and including LO 4.3 I've started having problems with sub forms

In my base application I have a number of tables, two of which are Subscribers and Payments which are linked on a common column Subscriber_ID. There is a third table that is used to filter the data in the subscribers table only ever has one row in it.

I only have one form and when I use the form editor and then start the Form Navigator I see this -

Forms
	FormSearch
		FormDetails
			FormPayments 


In the above my main form is FormSearch which is linked to the subform FormDetails by the common column Subscriber_ID. The subform FormDetails is itself linked to the subform FormPayments by the common column Subscriber_ID.

For the past 15 months upto and including LO 4.2.4 this has worked flawlessly as follows -

A1.
Open the form and see the last viewed subscriber details with matching payment details.

A2.
Select a different subscriber from a drop down box in FormSearch, the contents of the sub form FormDetails changes to reflect the required subscriber and the contents of the sub form FormPaymens changes to reflect the required subscriber's payment details.


Since 4.3 what I get is this -

B1.
 Open the form and see the last viewed subscriber details with matching payment details. LO 4.3 does this correctly.

B2.
Select a different subscriber from a drop down box in FormSearch, the contents of the sub form FormDetails changes to reflect the required subscriber but the contents of the sub form FormPaymens now longer changes to reflect the required subscriber's payment details. This is wrong the contents of FormPayments should change just like it did in LO 4.2.4.

B3.
Restart LO.

B4.
Open the form and see the last viewed subscriber details now with the correct payment details.

B5.
Select a different subscriber from a drop down box in FormSearch, the contents of the sub form FormDetails changes to reflect the required subscriber but the contents of the sub form FormPaymens now longer changes to reflect the required subscriber's payment details. This is wrong the contents of FormPayments should change just like it did in LO 4.2.4.


With LO 4.3 I can use this work around. -

Select the subscriber I want to work with, it will have the payment details of the previously viewed subscriber.

Close LO

Open LO.

I now see the correct payment details for the current subscriber.
Comment 1 Alex Kempshall 2014-08-04 21:40:57 UTC
Created attachment 104021 [details]
This file demonstrates correct function in 4.2.4 and incorrect in 4.3
Comment 2 Alex Kempshall 2014-08-04 21:42:17 UTC
The attached file uses HSSQLDB as the database. Same problem occurs when using MariaDB.
Comment 3 Lionel Elie Mamane 2014-08-06 13:39:06 UTC
Thank you for your bug report. This was a nice one... When asking a RowSet (the data a form is linked to is provided by a RowSet) for the value of its n-th column, the result was correct. But if one asked for the object representing the n-th column, and then asked the column object its value, the result was the first value the column ever got.

How is this linked to this bug? Well, subforms went the route of getting the column object, then ask the column its value.
Comment 4 Commit Notification 2014-08-06 13:51:17 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=03a2b4a80c5854bcb8520f2a43e485b98e3eba8f

fdo#82151 when constructing column object, replace m_aCurrentRow by a function



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2014-08-07 09:35:40 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5be4407d0716f78acdcdf24de135af91f17e51be

fdo#82151 fixup



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Alex Kempshall 2014-08-07 10:02:40 UTC
This morning

pulled the latest code with git
compiled
tested

All OK.

Problem solved.

Thanks so much
Comment 7 Goyo 2014-08-09 15:44:01 UTC
*** Bug 81976 has been marked as a duplicate of this bug. ***
Comment 8 Julien Nabet 2014-08-11 11:25:28 UTC
*** Bug 82454 has been marked as a duplicate of this bug. ***
Comment 9 Julien Nabet 2014-08-13 09:46:05 UTC
*** Bug 82549 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2014-08-14 08:07:33 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3dc29ff5846160060587d41f22868486ffd4e96e&h=libreoffice-4-3

fdo#82151 when constructing column object, replace m_aCurrentRow by a function


It will be available in LibreOffice 4.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 tim 2014-08-17 14:29:18 UTC
I have tested in 4.3.2 development version, ubuntu 14.04 64 bit.  The problem is fixed.

However, I have encountered other new problems with this dev version that appear to be random.  The same action succeeds most of the time and then fails (it is an insert new record with a date field that 1 time in 10 or so reports that the date is not in the right format even though it is set by the same code to the current date and time in all cases).  When and if I have something more solid to report I will of course do so.
Comment 12 tim 2014-08-17 14:30:57 UTC
Apologies - I should have also said:

a) Thanks for the fix
b) I'll raise a new bug report if I can produce a reproducible fault regarding my new problem
Comment 13 tim 2014-08-18 08:54:53 UTC
I've replicated the new issue I mentioned above in 4.3.2 and provided a demo in #82757.
Comment 14 Robert Großkopf 2014-08-24 18:46:20 UTC
*** Bug 82720 has been marked as a duplicate of this bug. ***
Comment 15 Robert Großkopf 2014-08-24 18:46:51 UTC
*** Bug 82884 has been marked as a duplicate of this bug. ***
Comment 16 Robert Großkopf 2014-08-24 18:47:17 UTC
*** Bug 82905 has been marked as a duplicate of this bug. ***
Comment 17 Robert Großkopf 2014-09-11 19:40:21 UTC
*** Bug 83629 has been marked as a duplicate of this bug. ***
Comment 18 Robert Großkopf 2014-09-11 19:44:36 UTC
*** Bug 83713 has been marked as a duplicate of this bug. ***