Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[342] Delete assignments and evaluations when an evaluator is deleted #404

Merged
merged 5 commits into from
Feb 11, 2025

Conversation

emmabjj
Copy link
Contributor

@emmabjj emmabjj commented Feb 7, 2025

Linked ticket: #112 #342

AC: When an Evaluator is removed from a Challenge phase, we need to remove the other associations if they exist.
Currently the EvaluatorManagementService is only deleting the ChallengePhaseEvaluator, however it should also delete any EvaluatorSubmissionAssignment and Evaluation records associated with that user, if any exist.

Note: Given that EvaluatorSubmissionAssignment has has_one :evaluation, dependent: :destroy, when destroy_all is called on the assignments, it will trigger the dependent destroy callback and delete the associated evaluation as well.

… when evaluator is removed from a challenge phase
@emmabjj emmabjj self-assigned this Feb 7, 2025
@r-bartlett-gsa r-bartlett-gsa added this to the Sprint 02/11/25 milestone Feb 7, 2025
@r-bartlett-gsa r-bartlett-gsa linked an issue Feb 7, 2025 that may be closed by this pull request
6 tasks
@emmabjj emmabjj requested a review from stepchud February 10, 2025 18:06
Copy link
Contributor

@stepchud stepchud left a comment

Choose a reason for hiding this comment

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

looks good!

@emmabjj emmabjj merged commit 91bc120 into dev Feb 11, 2025
11 checks passed
@emmabjj emmabjj deleted the 342_delete_assignments_evaluations_on_evaluator_deletion branch February 11, 2025 14:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete assignments and evaluations when an evaluator is deleted
3 participants