-
Notifications
You must be signed in to change notification settings - Fork 0
adds a name to the composite modifications + updates the composite creation endpoint #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Meklo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Evolving ModificationInfos to include composite subModification and its name in the message values will be done later ?
Additionally I've noticed when using INSERT_COMPOSITE it create two new entries in composite_modification table which corresponds to two modifications, one with the targetted group_uuid and one with a blank group_uuid, is this intended or a mishap on my side ?
| MOVE, | ||
| COPY, | ||
| SPLIT_COMPOSITE, // the network modifications contained into the composite modifications are extracted and inserted one by one | ||
| INSERT_COMPOSITE // the composite modifications are fully inserted as composote modifications |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
| <changeSet author="deharbemat (generated)" id="1770384121049-15"> | ||
| <addColumn tableName="composite_modification"> | ||
| <column name="composite_name" type="varchar(255)"/> | ||
| </addColumn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no issue if it hasn't a default name for preexisting composite modifications ?
| @Parameter(description = "the modification Uuid to move before (MOVE option, empty means moving at the end)") @RequestParam(value = "before", required = false) UUID beforeModificationUuid, | ||
| @Parameter(description = "origin group UUID, where modifications are copied or cut") @RequestParam(value = "originGroupUuid", required = false) UUID originGroupUuid, | ||
| @Parameter(description = "modifications can be applied (default is true)") @RequestParam(value = "build", required = false, defaultValue = "true") Boolean canApply, | ||
| @Parameter(description = "composite modifications names") @RequestParam(value = "compositeNames", required = false) List<String> compositeNames, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be added to modificationContextInfos ? Like do you think it would be possible to replace List from the Pair to a list of records/dto containing UUID and their coresponding compositeName ?
compositeName would be optional to keep the system working for copying non composite modifications
| @NonNull List<UUID> compositeModificationsUuids, | ||
| @NonNull List<String> compositeNames) { | ||
| List<CompositeModificationEntity> newCompositeModifications = new ArrayList<>(); | ||
| for (int i = 0; i < Math.min(compositeNames.size(), compositeModificationsUuids.size()); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be a discrepancy between UUIDs and names amount ?
| @NonNull List<String> compositeNames) { | ||
| List<CompositeModificationEntity> newCompositeModifications = new ArrayList<>(); | ||
| for (int i = 0; i < Math.min(compositeNames.size(), compositeModificationsUuids.size()); i++) { | ||
| UUID newCompositeModificationUuid = cloneCompositeModification(compositeModificationsUuids.get(i), compositeNames.get(i)); // ici c'est fait orderonné par modification order plutôt que UUID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better translate the comment in english
needs : gridsuite/network-modification#156