Bug 49328 - EDITING: Relations form-subform, suggested when editing forms, won't work right
Summary: EDITING: Relations form-subform, suggested when editing forms, won't work right
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Forms
  Show dependency treegraph
 
Reported: 2012-05-01 00:34 UTC by Robert Großkopf
Modified: 2024-11-08 07:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Database with 3 tables, one table with two foreign-keys. (715.28 KB, application/vnd.sun.xml.base)
2012-08-28 18:50 UTC, Robert Großkopf
Details
Detailed description how to choose the dialog with wring suggestion (152.29 KB, application/vnd.oasis.opendocument.text)
2012-08-28 18:55 UTC, Robert Großkopf
Details
Description how to get the right connection with form-wizard and the wrong with suggestion in the dialog (226.13 KB, application/vnd.oasis.opendocument.text)
2012-08-30 19:12 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2012-05-01 00:34:03 UTC
When creating a form and a subform you have to define the relations between form and subform. There is a possibility to link from one form to another. When you youse the litte wizard for it and press the button, that it should suggest the right values, it only works with the fist field of the subform with the right fieldtype. Relationships, which are created in the database, are not consulted.

When creating whole forms with the wizard it works right. Wizard reads the relationships right from the database.
Comment 1 Jochen 2012-08-27 18:51:44 UTC
Hi Robert,

1) Please add the LO-version in which the bug occurs.

2) I don´t unterstand the procedure. Can you create a screenshot
Comment 2 Robert Großkopf 2012-08-28 18:50:42 UTC
Created attachment 66239 [details]
Database with 3 tables, one table with two foreign-keys.

Try to change the relation between form and subform in the form "Leser_subformtest" with the suggestion of the dialog. It suggests wrong values. The form itsel is created with the form-wizard. This wizard suggests the rigtht values.
Comment 3 Robert Großkopf 2012-08-28 18:55:30 UTC
Created attachment 66240 [details]
Detailed description how to choose the dialog with wring suggestion

In this description is declared how to find the wrong dialog. The suggestion of this dialog works in the right way, when I copied two tables, switched the position of the foreign-keys in one of the tables and declared the relationship new.
Without declaring the relationship the dialog didn't suggest anything - the button is disabled. But the function behind the button doesn't read the relationship at all.
Comment 4 Jochen 2012-08-29 18:23:58 UTC
@ Robert,

thx for attach 66240. But I can´t reproduce some steps. Please list more details in your document.

You wrote:
When you start the form-wizard with the table „Leser“ you could choose the table „Ausleihe“ as subform. The relation between both tables is choosen automatically.
Asks from me:
1) What means "start the form-wizard with the table „Leser“". Please describe exactly the procedure. E.g. do you choose table "Table: Leser"? And which "available fields" have you chosen?
2) I created a form with the "Wizard to Create Form". I have chosen as subform "Table: Ausleihe". Also here: Please describe exactly the procedure. E.g. have you chosen the automatic selection or the "manual selection"? And which "available fields" have you chosen?
3) The next steps?

You wrote:
Picture 2: ... When you haven't used the form-wizard you could chosse the entries for Link fields in a dialog. See the cursor over the three point, which start this dialog.
Asks from me:
1) Please describe exactly the procedure ("you could chosse the entries for Link fields in a dialog")
2) What do you mean with "See the cursor over the three point"?

You wrote:
Picture 3: This dialog has a button „Suggest“. ...
1)  This dialog has a button „Suggest“. What dialog? How do open this dialog?
2) I will test the rest if I know the procedure.
Comment 5 Robert Großkopf 2012-08-30 19:12:50 UTC
Created attachment 66367 [details]
Description how to get the right connection with form-wizard and the wrong with suggestion in the dialog

The way to get the right connection between two forms:
Use the form-wizard, add the subform, base on an existing relation. This relation is the relation choosen in Tools → Relationships.

After creating such a form (with subform) open the form for editing. Open the form-navigator and there, with a click of the right button of the mouse, open the properties of the subform. You could see the linked fields (as linked by the form-wizards). There are buttons between the fields, for example 
Link master fields... "ID" [...].
A click on one of this buttons opens a dialog. Choose in this dialog "Suggest". The wrong connection is suggested.
Comment 6 Jochen 2012-08-31 20:58:11 UTC
@ Robert
Now I understand what you mean. I can reconstruct your observation. But I want to discuss your conclusion.

You believe there is a bug.

IMHO it is possible that there is a normal behavior. Click on "Sugggest" shows all (!) fields of the table "Ausleihe" and this is IMHO correct.
I understand you so that your argues "The table "Medien" doesn't exist in this form" is the cause of the malfunction. I can´t comprehend this argument. "Medien_ID" isn´t a field of the table "Medien" but of the table "Ausleihe.

We need another base-specialist to confirm your suspicion.
Perhaps someone reading this bugreport can help.

I set Lionl to CC.
Comment 7 Robert Großkopf 2012-09-01 08:09:52 UTC
@Jochen:
Difference between the suggestion of the form-wizard and the dialog, where you can link the forms, is:
The form-wizard works right with the defined relationships of the database.

The dialog works wrong (or didn't have a look) at the relationsships. When I press "Suggest" I expect, that the dialog would have a look at the defined relationship - but I don't know, whre the dialog gets it's information from, not only from the relationship, also from the position of a field in the table and other tables in the database ...
Comment 8 Jochen 2012-09-01 08:45:49 UTC
Hi Rainer,
please have a look at comment 6 and comment 7.
Which procedure do you suggest?
Comment 9 Robert Großkopf 2013-04-21 19:29:59 UTC
The content of this report seems to be clear:
Formwizard reads the relationship of the table from the database.
If you will create a form without the wizard and will link a subform to a mainform, you could chose the fields, which should be linked. You could also press the button "Suggest" - but this "Suggestion" doesn't have a look at the relationship of the table like the formwizard. It suggests only the first field, which has the same fieldtype as the chosen fieldtype of the mainform.
I will change the status to "New".
Base works well without fixing this bug. So I change the importance also to "low" and "minor".
Comment 10 Alex Thurgood 2015-01-03 17:38:29 UTC Comment hidden (no-value)
Comment 11 QA Administrators 2016-01-17 20:02:49 UTC Comment hidden (obsolete)
Comment 12 Robert Großkopf 2016-01-20 06:39:25 UTC
Bug still exists with LO 5.1.0.2, OpenSUSE 42.1 Leap, 64bit rpm Linux.
Comment 13 Robert Großkopf 2016-03-06 16:46:32 UTC
Bug appears also in the first available LO-version (LO 3.3.0.4, OpenSUSE 42.1 64bit rpm Linux). So I set this bug as "Inherited From OOo".
Comment 14 QA Administrators 2017-05-22 13:19:53 UTC Comment hidden (obsolete)
Comment 15 Robert Großkopf 2017-05-28 15:41:23 UTC
Bug still exists with LO 5.4.0.0.beta1, OpenSUSE 42.1 Leap, 64bit rpm Linux.
Comment 16 QA Administrators 2018-06-17 02:43:33 UTC Comment hidden (obsolete)
Comment 17 Robert Großkopf 2018-06-17 07:01:25 UTC
Bug still exists with LO 6.0.5.1, OpenSUSE 42.3 Leap, 64bit rpm Linux.
Comment 18 QA Administrators 2019-06-18 02:47:18 UTC Comment hidden (obsolete)
Comment 19 Robert Großkopf 2019-06-18 05:41:37 UTC
Buggy behaviour is still the same in LO 6.2.4.2 on OpenSUSE 15 64bit rpm Linux
Comment 20 QA Administrators 2021-06-18 04:02:39 UTC Comment hidden (obsolete)
Comment 21 Robert Großkopf 2021-06-18 13:23:20 UTC
Bug is still the same in LO 7.1.4.2 on OpenSUSE 15.2 64bit rpm Linux.

Here a very short description:
Open the database.
Open the form for editing, not for input data.
Click on the second tablecontrol (MedienID and others).
Right mouseclick and open form properties.
See relation between the forms: "ID" to "Leser_ID" as it is described in relationship of the database.
Click on the button with the three points on the right.
Let suggest which fields should be choosen. 
It will choose "Medien_ID", which is the wrong field an not connected in the relationship of the database to "Leser".
Comment 22 QA Administrators 2024-11-08 03:15:08 UTC Comment hidden (obsolete)
Comment 23 Robert Großkopf 2024-11-08 07:31:49 UTC
Bug is still the same in
Version: 24.8.3.1 (X86_64) / LibreOffice Community
Build ID: 65412f067af443213e726c93f137ccc85c9a1e06
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