Bug 404891

Summary: Cannot add foreign key to entity
Product: [Applications] umbrello Reporter: Yuriy <atskijvinny>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal CC: ralf.habacker
Priority: NOR    
Version: 2.27.2 (KDE Applications 18.12.2)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 2.27.3 (KDE Applications 18.12.3)
Attachments: Blocked controls
Blocked controls 2 (scr004)
Example data of entity models I use

Description Yuriy 2019-02-28 06:44:29 UTC
Created attachment 118425 [details]
Blocked controls

I have a lot of entities in my umbrello modeller. So I decided to group entities to folders. The next step was to add foreign key constraint to entities. But.. it does not work =)

I've made some tests on clear project.
1. If I place entities in the root of ERD - all works fine.
2. If I place entities in folder - the controls of "Foreign Key Setup" dialogue are blocked (scr003).
3. The same, if I try to add foreign key to entity at the root of ERD (scr004).
Comment 1 Yuriy 2019-02-28 06:45:41 UTC
Created attachment 118426 [details]
Blocked controls 2 (scr004)
Comment 2 Yuriy 2019-02-28 06:46:53 UTC
Created attachment 118427 [details]
Example data of entity models I use
Comment 3 Ralf Habacker 2019-02-28 09:39:11 UTC
Thanks for this bug report. 
The cause of the problem is that after selecting a referenced entity on the general page located in a folder, umbrello does not find it.
Comment 4 Ralf Habacker 2019-02-28 10:38:10 UTC
Git commit be576384df1b2e8ba6b8fcecf6a2323ce3539413 by Ralf Habacker.
Committed on 28/02/2019 at 10:36.
Pushed by habacker into branch 'Applications/18.12'.

Fix 'Cannot add foreign key to entity'

The search function used in the foreign
key constraints dialog box did not support
searching for subfolders.
FIXED-IN:2.27.3 (KDE Applications 18.12.3)

M  +6    -3    umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
M  +29   -0    umbrello/model_utils.cpp
M  +4    -0    umbrello/model_utils.h
M  +35   -0    umbrello/umldoc.cpp
M  +8    -0    umbrello/umldoc.h

https://commits.kde.org/umbrello/be576384df1b2e8ba6b8fcecf6a2323ce3539413