archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
914 stars 267 forks source link

Detection of duplicated relations does not work for cloned elements on a view #968

Closed JohannBlais closed 9 months ago

JohannBlais commented 9 months ago

Version of Archi

Archi 5.1

Archi Plug-ins

coArchi

Operating System

Windows 11

Expected Behaviour

When a view has multiple occurrences of the same elements, the detection of duplicated relations does not work anymore.

Actual Behaviour

I am able to add the same relation between two elements without the system prompting me if I want to create a new one or use the existing one.

Steps to Reproduce the Behaviour

  1. Ensure that you have a few application components in the repository and that an association relation exists between two elements "A" and "B".
  2. Ensure that the "Paste special" functionality creates another reference to the same element and does not duplicate it.
  3. Create a new view
  4. Drag and drop components A and B on the view. The association relation should appear between the two.
  5. Add a new association between the two elements A and B. The system should tell you a connection already exist and ask you to choose to create a new one or use the existing.
  6. Select A, "Copy", "Paste special" on the same view
  7. Select B, "Copy", "Paste special" on the same view
  8. You should have two occurences of the same elements on the view.
  9. Create a new association connection between the "clones" of A and B.
  10. The system creates a new connection instead of prompting as for step 5.
Phillipus commented 9 months ago

HI, I followed your steps but at stage 9 I'm prompted to choose a new or existing relationship. Can you double-check you did Paste Special?

Phillipus commented 9 months ago

Something to check is the direction of the Association relationship. If you adding a new relation where the source is B and target A then it will be regarded as a new relationship.

JohannBlais commented 9 months ago

Indeed, I was about to comment on this. I noticed that the system works if I select the elements in the reverse order. It was a bit misleading as the relation is not directed, but I understand how it works now. Closing.