diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java index c0173e35..e797c50f 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusService.java @@ -244,6 +244,7 @@ public Pair updateGraduationStatus(UUI sourceObject.setHonoursStanding(null); sourceObject.setGpa(null); sourceObject.setSchoolAtGrad(null); + sourceObject.setSchoolAtGradId(null); archiveStudentAchievements(sourceObject.getStudentID(),accessToken); } else { deleteStudentAchievements(sourceObject.getStudentID(), accessToken); @@ -1099,6 +1100,7 @@ public Pair undoCompletionStudent(UUID gradEntity.setHonoursStanding(null); gradEntity.setGpa(null); gradEntity.setSchoolAtGrad(null); + gradEntity.setSchoolAtGradId(null); gradEntity.setUpdateUser(null); gradEntity.setUpdateDate(null); gradEntity = graduationStatusRepository.save(gradEntity); @@ -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; diff --git a/api/src/test/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusServiceTest.java b/api/src/test/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusServiceTest.java index 7b27b911..568ae40e 100644 --- a/api/src/test/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusServiceTest.java +++ b/api/src/test/java/ca/bc/gov/educ/api/gradstudent/service/GraduationStatusServiceTest.java @@ -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(); @@ -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(); @@ -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