Closed eclipse-capella-bot closed 3 years ago
sandu.postaru commented on 2020-10-28
Here is the context f this bug:
We have a target model A and a reqif file that we want to import.
When a reqif file is imported, the xml requif elements are transformed into ReqIf model elements. Next a temporary copy of model A is is created. All of the existing Reqif model elements are deleted from this temporary model and replaced with the newly created ones (at the previous step). Let us call this temporary source model B.
Next a diff merge is done between temporary source model B and target model A.
Any Requif elements that were created in model A (Requirements, CapellaRelations), can not exist into model B since this model was created from a reqif file. These newly created elements should be shown as deletions in the diff merge TARGET SCOPE.
Any Requif deleted elements in model A that are still present in model B (and thus in the requif file) should be shown as additions in the diff merge REFERENCE SCOPE.
The bug was that CapellaIncomingRelations were not removed from source model B during its construction, thus their target was not correctly mapped to the existing Requirement in model A, and thus they were not shown as deletions but as updates. Since the target of the CapellaIncomingRelation was a Requirement stored in temporary model, if the user merges the changes, the save of the model will fail.
philippe.dul commented on 2021-01-06
fixed
Scenario
1 Import Reqif 2 Create a diagram, add a requirement and a CapellaOutgoingRelation to it 3 Import Reqif again
Currently: The diff merge should display a single difference, colored in violet, meaning that the relation is present in the Reqif file and it will be updated. The update causes a save error since the target is contained in a temporary resource.
Expected: The diff merge should display a single difference, colored in blue meaning that the relation is not present in the ReqIf file and it will be deleted
🆔 ECLIPSE-568336
👷 sandu.postaru
📅 2020-10-28
🔎 0.10.3