Skip to content

Commit

Permalink
GRAD2-3102 - clears schoolAtGradId when schoolAtGrad is cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
mightycox committed Dec 4, 2024
1 parent 38f1f56 commit 5f087f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ public Pair<GraduationStudentRecord, GradStatusEvent> updateGraduationStatus(UUI
sourceObject.setHonoursStanding(null);
sourceObject.setGpa(null);
sourceObject.setSchoolAtGrad(null);
sourceObject.setSchoolAtGradId(null);
archiveStudentAchievements(sourceObject.getStudentID(),accessToken);
} else {
deleteStudentAchievements(sourceObject.getStudentID(), accessToken);
Expand Down Expand Up @@ -1101,6 +1102,7 @@ public Pair<GraduationStudentRecord, GradStatusEvent> undoCompletionStudent(UUID
gradEntity.setHonoursStanding(null);
gradEntity.setGpa(null);
gradEntity.setSchoolAtGrad(null);
gradEntity.setSchoolAtGradId(null);
gradEntity.setUpdateUser(null);
gradEntity = graduationStatusRepository.save(gradEntity);
historyService.createStudentHistory(gradEntity, USER_UNDO_CMPL);
Expand Down Expand Up @@ -1213,6 +1215,7 @@ public boolean restoreGradStudentRecord(UUID studentID,boolean isGraduated) {
gradEnity.setHonoursStanding(null);
gradEnity.setGpa(null);
gradEnity.setSchoolAtGrad(null);
gradEnity.setSchoolAtGradId(null);
}
graduationStatusRepository.save(gradEnity);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ public void testUpdateGraduationStatus_givenDifferentPrograms_when1950ProgramIsV
assertThat(result.getStudentStatus()).isNull();
assertThat(result.getProgram()).isNull();
assertThat(result.getSchoolOfRecord()).isNull();
assertThat(result.getSchoolAtGradId()).isNull();
assertThat(result.getGpa()).isNull();

assertThat(result.getRecalculateGradStatus()).isNull();
Expand Down Expand Up @@ -788,6 +789,7 @@ public void testUpdateGraduationStatus_givenDifferentPrograms_whenProgramIsValid
assertThat(result.getStudentStatus()).isNull();
assertThat(result.getProgram()).isNull();
assertThat(result.getSchoolOfRecord()).isNull();
assertThat(result.getSchoolAtGradId()).isNull();
assertThat(result.getGpa()).isNull();

assertThat(result.getRecalculateGradStatus()).isNull();
Expand Down Expand Up @@ -2039,6 +2041,7 @@ public void testUgradStudent() throws JsonProcessingException {
assertThat(result.getHonoursStanding()).isNull();
assertThat(result.getGpa()).isNull();
assertThat(result.getSchoolAtGrad()).isNull();
assertThat(result.getSchoolAtGradId()).isNull();
}

@Test
Expand Down

0 comments on commit 5f087f6

Please sign in to comment.