Skip to content

Commit

Permalink
Merge pull request #720 from bcgov/feature/GRAD2-3102
Browse files Browse the repository at this point in the history
GRAD2-3102 - clears schoolAtGradId when schoolAtGrad is cleared
  • Loading branch information
mightycox authored Dec 18, 2024
2 parents 02c6487 + 5f087f6 commit 0a1dbbf
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 @@ -244,6 +244,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 @@ -1099,6 +1100,7 @@ public Pair<GraduationStudentRecord, GradStatusEvent> undoCompletionStudent(UUID
gradEntity.setHonoursStanding(null);
gradEntity.setGpa(null);
gradEntity.setSchoolAtGrad(null);
gradEntity.setSchoolAtGradId(null);
gradEntity.setUpdateUser(null);
gradEntity.setUpdateDate(null);
gradEntity = graduationStatusRepository.save(gradEntity);
Expand Down Expand Up @@ -1212,6 +1214,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 0a1dbbf

Please sign in to comment.