Skip to content

fix: ANT-4949 - add cm trajectory deletion logic for dsr#479

Merged
salemsd merged 5 commits into
developfrom
fix/ANT-4949_CM_traj_deletion
May 5, 2026
Merged

fix: ANT-4949 - add cm trajectory deletion logic for dsr#479
salemsd merged 5 commits into
developfrom
fix/ANT-4949_CM_traj_deletion

Conversation

@salemsd

@salemsd salemsd commented May 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 08:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates trajectory unlinking so that removing the last DSR trajectory with time series can also clean up linked DSR capacity-modulation (CM) trajectories. It fits into the trajectory management service by extending detach behavior for DSR-specific dependencies.

Changes:

  • Added DSR-specific unlink logic in TrajectoryServiceImpl to detect the last time-series DSR in a study.
  • Added CM cleanup and orphan-deletion checks when eligible DSR trajectories are detached.
  • Added repository support and unit tests for the new CM cleanup flow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/main/java/com/rte_france/antares/datamanager_back/service/common/impl/TrajectoryServiceImpl.java Adds transactional unlink flow, last-DSR detection, and CM trajectory cleanup.
src/main/java/com/rte_france/antares/datamanager_back/repository/StudyTrajectoryRepository.java Adds an existence check used to decide whether a CM trajectory is orphaned.
src/test/java/com/rte_france/antares/datamanager_back/service/TrajectoryServiceImplTest.java Adds unit tests covering orphaned/non-orphaned CM deletion and the non-last-DSR case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@salemsd salemsd changed the title fix: add cm trajectory deletion logic for dsr fix: ANT-4949 - add cm trajectory deletion logic for dsr May 5, 2026
@sonarqubecloud

sonarqubecloud Bot commented May 5, 2026

Copy link
Copy Markdown

@salemsd salemsd merged commit 3420b5d into develop May 5, 2026
4 checks passed
@salemsd salemsd deleted the fix/ANT-4949_CM_traj_deletion branch May 5, 2026 14: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.

2 participants