Skip to content

Conversation

@Mathieu-Deharbe
Copy link
Contributor

PR Summary

intermediary class in order to call the network modification description updater in network-modification-server : gridsuite/network-modification-server#743

Mathieu-Deharbe and others added 5 commits December 5, 2025 15:20
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>

@Transactional
public void updateNetworkModificationsDescription(UUID studyUuid, UUID nodeUuid, UUID modificationUuid, String userId, String description) {
List<UUID> childrenUuids = networkModificationTreeService.getChildrenUuids(nodeUuid);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this code is used in many others endpoint can we share it in a method ? if it is possible ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s possible but delicate because these uses are similar but not identical. By example mine doesn't use the groupUuid and, more importantly, doesn't invalidate the nodes.

So I don't think that this is really worth it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 have been merged here : f972646

The third (stashed) has not been merged with the others yet because it is a bit more dangerous. Maybe in a next small technical ticket.

@PutMapping(value = "/studies/{studyUuid}/nodes/{nodeUuid}/network-modifications", params = "description")
@Operation(summary = "Update the description of a network modification")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Update the description of a network modification"), @ApiResponse(responseCode = "404", description = "The study/node is not found")})
public ResponseEntity<Void> updateNetworkModificationDescription(@Parameter(description = "Study UUID") @PathVariable("studyUuid") UUID studyUuid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for the other PR. Why do we add a new endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both have been merged here : f972646

Copy link
Contributor

@EtienneLt EtienneLt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small things

@Parameter(description = "New activated value") @RequestParam(name = "activated", required = true) Boolean activated,
@RequestHeader(HEADER_USER_ID) String userId) {
@PutMapping(value = "/studies/{studyUuid}/nodes/{nodeUuid}/network-modifications")
@Operation(summary = "Updates the metadata of a network modification")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Operation(summary = "Updates the metadata of a network modification")
@Operation(summary = "Updates metadata of a network modification")

small thing

Copy link
Contributor

@EtienneLt EtienneLt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test OK code OK

@sonarqubecloud
Copy link

@Mathieu-Deharbe Mathieu-Deharbe merged commit 2ce6f7a into main Dec 17, 2025
4 checks passed
@Mathieu-Deharbe Mathieu-Deharbe deleted the add-netmod-description branch December 17, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants