Bug 123639 - Erasing Master & Slave Fields in form properties does not unlink them from form.
Summary: Erasing Master & Slave Fields in form properties does not unlink them from form.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-22 08:11 UTC by mmlazgar
Modified: 2019-03-04 13:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
steps to reproduce (47.24 KB, application/pdf)
2019-02-24 17:39 UTC, ribotb
Details
demonstration (130.59 KB, application/pdf)
2019-02-27 13:53 UTC, ribotb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mmlazgar 2019-02-22 08:11:03 UTC
Description:
In base, if I create a master & slave field link between a form & subform, that link remains if you try to erase them or change them.  The only way I've found that fixes this issue is to create a new master form (Master as in the top level form of the two) without the link and move the form controls to the new form.

Steps to Reproduce:
1.Create a form & sub form
2.Link a master and slave field
3.erase the link
4.the data referenced in the form will be the same as what was referenced by the master/slave link.
5. Change the table for the master fields doesn't affect the results.

Actual Results:
Nothing done will remove the master/slave link.  I have to create a new form for the master fields and move everything to the new form.

Expected Results:
Still got the results from having the fields linked.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Should get results as if no link were present, as no link is showing the form properties box.
Comment 1 ribotb 2019-02-24 17:38:24 UTC
If I have understand the steps to reproduce, I reproduce.
See attachment
Comment 2 ribotb 2019-02-24 17:39:38 UTC
Created attachment 149559 [details]
steps to reproduce
Comment 3 mmlazgar 2019-02-24 18:24:46 UTC
It looks like you are having the same result as I am.
Comment 4 Robert Großkopf 2019-02-25 16:36:03 UTC
The link in the form is created by you. It mustn't be the same link as the link in the relationships. So it wouldn't recognize if you change the relationship for the tables and will show the old result. If the field of the link in the mainform and in the subform do exist it will show the related data. Screenshots doesn't show an erazed link from form to subform.

You have linked, in your example, "IdEdt" of the two tables. You changed the value for "editeur" in the table, but the link "IdEdt" is still the same: '0' to '0'.

Could be I don't understand where you see the problem - but I can't see a bug. The last screenshot of the attachment shows the right result for linking "IdEdt".
Comment 5 Alex Thurgood 2019-02-26 08:48:38 UTC
I am similary as confused as Robert.

All you have done, as illustrated in the PDF is change the value of idedit in tbediteurs, yet your form still binds idedit.tbediteurs to idedit.tblogiciels. 

Although you have deleted the database relationship in the underlying database, why should the data displayed in the form, which is bound to the tables, be any different to that what you see in your final picture where the value of idedit.tbediteurs = 0 and is bound to the subform to idedit.tblogiciels also having the value of 0, thus displaying log1 and log2 ? What would you expect it to be ?
Comment 6 Alex Thurgood 2019-02-26 08:52:15 UTC
A better way of showing us so that we could attempt to reproduce would be to provide a sample database, containing all tables, relationships and forms required to demonstrate, and then providing step by step instructions.

Setting to NEEDINFO
Comment 7 ribotb 2019-02-26 09:32:17 UTC
(In reply to Robert Großkopf from comment #4)
> The link in the form is created by you. It mustn't be the same link as the
> link in the relationships. So it wouldn't recognize if you change the
> relationship for the tables and will show the old result. If the field of
> the link in the mainform and in the subform do exist it will show the
> related data. Screenshots doesn't show an erazed link from form to subform.
> 
> You have linked, in your example, "IdEdt" of the two tables. You changed the
> value for "editeur" in the table, but the link "IdEdt" is still the same:
> '0' to '0'.
> 
> Could be I don't understand where you see the problem - but I can't see a
> bug. The last screenshot of the attachment shows the right result for
> linking "IdEdt".

Hi,

I simply wanted to reproduce and illustrate the process described by mmlazgar@shaw.ca. 
I agree that the relationship in the form - subform is not the relationship traced in physical data model between tables (Tools > Relationships). And so the fact of removing the relationship in the physical model of the data has no effect on the relation established between the form and subform.

And I agree that there is no problem if my process is strictly identical to the process described by mmlazgar@shaw.ca in the bug report.
  
Unless I have not understood what mmlazgar@shaw.ca was trying to describe...

Bernard
Comment 8 mmlazgar 2019-02-26 17:35:58 UTC
I'm currently at work, so I can only comment from memory, and not attach anything to help at the moment.

The problem happens when working on a form with one or more sub forms.  Before creating a link, I would get results that were basically the whole unfiltered table. When I created a master/slave link between fields on master & slave form, I made an error which was giving me one result when I was expecting more.  Changing the master/slave links weould not change the results, and removing the link was still giving me the one (incorrect) result.  The only way I could get back to the results I was getting BEFORE adding the master/slave relationship was to recreate the subform and copy the form controls to the new subform and delete the old.

The relationships were created on the FORM, not in the Tools > Relationships setup window.

I hope this explains things a little more.
Comment 9 ribotb 2019-02-27 13:28:07 UTC
I think I have understand now!
Comment 10 ribotb 2019-02-27 13:52:19 UTC
Not reproduced.

Version: 6.0.7.3 (x64)
Build ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
Threads CPU : 4; OS : Windows 10.0; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: group

See attachment.

I hope I have understand :-)
Comment 11 ribotb 2019-02-27 13:53:45 UTC
Created attachment 149630 [details]
demonstration
Comment 12 mmlazgar 2019-02-28 05:19:59 UTC
Sorry gentlemen, I'm no longer able to reproduce the results. I figured out the work around and kept progressing my database, and now I can't get it to reproduce the results.
If I experience the issue again, I can reopen this.

My apologies.