Bug 425281 - Double association in the diagram after renaming a foreign key constraint
Summary: Double association in the diagram after renaming a foreign key constraint
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.31.3 (KDE releases 20.04.3)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-13 08:55 UTC by Ralf Habacker
Modified: 2021-02-11 23:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.32.1 (KDE releases 20.08.1)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2020-08-13 08:55:31 UTC
SUMMARY


STEPS TO REPRODUCE
1. start umbrello
2. add a new entity relation diagram
3. add two entities a and b
4. add entity attribute a.id and b.a_id
5. add foreign key constraint to b from b.a_id to a.id
6. rename foreign key constraint to something else

OBSERVED RESULT
There are now two associations shown, one with the old name and one with the new name

EXPECTED RESULT
There should only be one association displayed showing the new name

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE_Leap 15.1
KDE Frameworks Version: 5.55.0
Qt Version: 5.9.7
Comment 1 Robert Hairgrove 2020-08-13 10:22:02 UTC
I'm not sure that this bug is not present in other views, too.

If you draw an association between an actor and a use case, then delete it and save the file, there is still an element in the XMI file with tag "UML:Association" and the corresponding "UML:AssociationEnd" elements. The only thing that gets deleted is the <assocwidget> tag under the <diagram>.

If another association is created, then another UML:Association as well as the new <assocwidget> is created; the old UML:Association remains apparently as a zombie.

Renaming the association appears to work correctly, however.
Comment 2 Bug Janitor Service 2020-08-13 11:05:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/umbrello/-/merge_requests/10
Comment 3 Ralf Habacker 2020-08-13 11:10:54 UTC
Git commit 952091eba84977f1aad3c39be3d08f98a3abb2fa by Ralf Habacker.
Committed on 13/08/2020 at 10:52.
Pushed by habacker into branch 'release/20.08'.

Fix 'Double association in the diagram after renaming a foreign key constraint'

Since the name has changed, we can't find the widget by name and
have to use a different approach.
FIXED-IN:2.32.01 (KDE release 20.08.1)

M  +19   -15   umbrello/umlscene.cpp

https://invent.kde.org/sdk/umbrello/commit/952091eba84977f1aad3c39be3d08f98a3abb2fa
Comment 4 Ralf Habacker 2020-08-13 11:18:01 UTC
Git commit 0724d67ff8157eca8e51d3baef0b8e9711282107 by Ralf Habacker.
Committed on 13/08/2020 at 11:17.
Pushed by habacker into branch 'release/20.08'.

Compile fix

M  +9    -11   umbrello/umlscene.cpp

https://invent.kde.org/sdk/umbrello/commit/0724d67ff8157eca8e51d3baef0b8e9711282107
Comment 5 Ralf Habacker 2020-08-13 11:24:43 UTC
(In reply to Robert Hairgrove from comment #1)
> I'm not sure that this bug is not present in other views, too.

> If you draw an association between an actor and a use case, then delete it
> and save the file, there is still an element in the XMI file with tag
> "UML:Association" and the corresponding "UML:AssociationEnd" elements. The
> only thing that gets deleted is the <assocwidget> tag under the <diagram>.
> 
> If another association is created, then another UML:Association as well as
> the new <assocwidget> is created; the old UML:Association remains apparently
> as a zombie.
This is a different bug and should be reported in a different bug.