Bug 291557 - Copy/Paste of activity, state and use case diagram elements do not create new elements
Summary: Copy/Paste of activity, state and use case diagram elements do not create new...
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-15 00:00 UTC by Ralf Habacker
Modified: 2013-11-06 17:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.8.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2012-01-15 00:00:02 UTC
Version:           unspecified (using Devel) 
OS:                All

A copy and paste of elements in the activity diagram creates a new widget but no new xmi element.

Reproducible: Always

Steps to Reproduce:
1. Create a new activity diagram 
2. Add an activity 
3. copy/paste the  activity into the same diagram
4. connect both activities with an activity transistion
5. save the file
6. load the file


Actual Results:  
The transistion has both ends connected to the first activity. 

Expected Results:  
The transistion should have one end connected to the first and the other end to the second activity.

Inspecting the xmi file shows that both activities have the same XMIid, which is wrong. 

I set the severity to major because umbrello users expects, at least for the activity diagram, that the copy and paste operation create an independent element, not a hidden link to the original object.

In the class diagram for example the user sees clearly that a copy and paste operation creates a link, because a name change of the pasted class updates also the name of the element from which it has been copied. 

The state diagram, which is similar to the activity diagram, does not have this issue.
Comment 1 Ralf Habacker 2012-01-16 08:45:03 UTC
The use case diagram has a similar problem. Copy/pasted elements do have the same xmiid as the element from which they has been copied from, but umbrello forbids connecting the origin and the copied element because of the same id.
Comment 2 Ralf Habacker 2012-01-16 09:09:37 UTC
> The state diagram, which is similar to the activity diagram, does not have this
issue. 

There are still cases which affects the state diagram, changed the title of this bug.
Comment 3 Ralf Habacker 2012-01-16 09:56:57 UTC
Bug https://bugs.kde.org/show_bug.cgi?id=107358 related to this issue.
Comment 4 Ralf Habacker 2012-01-16 10:18:41 UTC
SVN commit 1273895 by habacker:

Fixed copy & pasting of elements in activity and state diagrams.


 M  +6 -1      umlclipboard.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1273895
Comment 5 Ralf Habacker 2012-01-16 11:43:31 UTC
Adding a similar patch to fix the use case diagram issue do not fix the issue - need to analyse more.
Comment 6 Ralf Habacker 2012-01-16 12:20:03 UTC
The difference to state or activity diagram elements is that use case diagram elements have a uml object connected to, which is displayed in the list view. A copy and paste of such elements refers to the same uml object. 

To copy a use case element there is currently only the duplicate function in the context menu available, which is very unflexible and inconsistant. One cannot duplicate connections for example. 

The question is for what purpose this difference is good or required ? It provides a non uniq user interface.

This issue has been already raised in https://bugs.kde.org/show_bug.cgi?id=107358, so a replacement of the duplicate function with copy&paste seem to make real sense and more natural.
Comment 7 Ralf Habacker 2012-01-16 17:53:41 UTC
Use case diagrams uses element linking on copy/paste by current design. A different implementation of this is handled at bug 107358.
Comment 8 Ralf Habacker 2013-11-06 17:31:23 UTC
set version-fixed-in from 4.8.0 changelog