COMET-IME-Community-Edition icon indicating copy to clipboard operation
COMET-IME-Community-Edition copied to clipboard

When a user makes a copy of an ElementDefinition inside the same model, this user shall get the option to copy the cotained parametrs with values or with default values (-)

Open samatstariongroup opened this issue 6 years ago • 6 comments

Prerequisites

  • [x] I have written a descriptive issue title
  • [x] I have verified that I am running the latest version of the CDP4-IME
  • [x] I have searched open and closed issues to ensure it has not already been reported

Description

On the copy context menu item, make 2 submenus; one that states "copy" and another that states "copy without values". This means that the "copy" feature provides a carbon copy (with the exception of the name property that gets the word copy appended). The other option, "create without values", shall create all the parameter with default values for the valuesets.

Even though this is a feature, it is related to server issue https://github.com/RHEAGROUP/CDP4-WebServices-Community-Edition/issues/46. When that issue is being resolved this feature should be taken into account

Steps to Reproduce

NA

Logs

  • [X] There are no logs regarding the issue

System Configuration

  • CDP4 version:

    • [x] CDP4-IME: 2.0.2
  • Web Services:

    • [x] CDP4 Web Services version: 4.0.0

samatstariongroup avatar Mar 13 '19 15:03 samatstariongroup

have you tried the different keys combination?

naronatrhea avatar Mar 13 '19 15:03 naronatrhea

we did not, this was a copy by means of right-mouse-click context menu "copy".

samatstariongroup avatar Mar 13 '19 15:03 samatstariongroup

I think it does, don't remember by heart

naronatrhea avatar Mar 13 '19 15:03 naronatrhea

related to this issue and also to copying between models @MartinFijneman and @samatrhea have the following in mind:

  • A Participant is assigned to one DomainOFExpertise (Power)
  • This particiapnt has ModifyIfOwner on ElementDefinition and Parameter

UseCase 1:

  • An ElementDefinition exists owned by Power which contains Parameters owned by Power, subscriptiosn owned by Thermal
  • the user (POWER) copies this -> the result is an ElementDefinition with Parameters all owned by Power and the subscirptions owned by Thermal
  • This is valid for a copy inside the same model and between 2 models

UseCase 2: -An ElementDefinition exists owned by Power which contains Parameters owned by Power and Thernal, subscriptiosn owned by Thermal and Power

  • the user (POWER) copies this -> the result is an ElementDefinition with Parameters all owned by Power and Thermal (as in the original) and the subscirptions owned by Thermal and Power (as in the original)
  • This is valid for a copy inside the same model and between 2 models

UseCase 3: -An ElementDefinition exists owned by THERMAL which contains Parameters owned by Power and Thernal, subscriptiosn owned by Thermal and Power

  • the user (POWER) copies this -> this is allowed by the server, the ownership of the resulting ElementDefinition is set to POWER, the ownership of the contained Parameters can be selected to be either all POWER or as is (from the source).
  • In case the THERMAL domain exists in the source model, but not in the Target model, the ownerhsip of all items (ElementDefinitiosn, Parameters, subscriptiosn etc). is set to the POWER domain
  • This is valid for a copy between 2 models
  • We still need to determine what happens with contained ElementUsages and the referenced ElementDefinitions.

this behavior is to be continued. UseCase 1 and Usecase 2 are fixed, 3 needs work

samatstariongroup avatar Mar 13 '19 17:03 samatstariongroup

This has been implemented and iterated on implementation in https://github.com/RHEAGROUP/CDP4-WebServices-Community-Edition/issues/46

samatstariongroup avatar Apr 16 '19 14:04 samatstariongroup

@samatstariongroup
This issue is marked as "closed" but I don't see / know of any option for copying (duplicate) within the same Engineering Model including Parameter Values, the default operation from the context menu copies the Element Definition with default values (-) only. We have a respective request from a user and I was checking the issues to find out if this was possible. I think this should be re-opened.

stepjah avatar May 05 '25 14:05 stepjah