From 2ca69493f3fe2b83babb714866bcbe94aa80c56f Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Tue, 21 Nov 2023 09:30:04 -0800 Subject: [PATCH 1/2] GRAD2-2362 & GRAD2-2388: task is complete. GRAD2-2362 & GRAD2-2388: task is complete. --- .../educ/api/gradstudent/service/GraduationStatusService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 387453fc..7766ee7e 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 @@ -229,7 +229,7 @@ public Pair updateGraduationStatus(UUI BeanUtils.copyProperties(sourceObject, gradEntity, CREATE_USER, CREATE_DATE, "studentGradData", "studentProjectedGradData", "recalculateGradStatus", "recalculateProjectedGrad"); gradEntity.setProgramCompletionDate(sourceObject.getProgramCompletionDate()); - gradEntity.setUpdateUser(""); + gradEntity.setUpdateUser(null); gradEntity = graduationStatusRepository.saveAndFlush(gradEntity); historyService.createStudentHistory(gradEntity, USER_EDIT); final GradStatusEvent gradStatusEvent = createGradStatusEvent(gradEntity.getUpdateUser(), gradEntity, @@ -864,6 +864,7 @@ public Pair undoCompletionStudent(UUID gradEntity.setHonoursStanding(null); gradEntity.setGpa(null); gradEntity.setSchoolAtGrad(null); + gradEntity.setUpdateUser(null); gradEntity = graduationStatusRepository.save(gradEntity); historyService.createStudentHistory(gradEntity, USER_UNDO_CMPL); final GradStatusEvent gradStatusEvent = createGradStatusEvent(gradEntity.getUpdateUser(), gradEntity, From e7d99bb21ef72ced5576d854d7faf0bc94c1047a Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Tue, 21 Nov 2023 09:44:16 -0800 Subject: [PATCH 2/2] GRAD2-2388: added a missing file. GRAD2-2388: added a missing file. --- .../educ/api/gradstudent/service/DataConversionService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/DataConversionService.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/DataConversionService.java index 31450ef4..c58bd69c 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/DataConversionService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/DataConversionService.java @@ -104,9 +104,11 @@ public GraduationStudentRecord saveGraduationStudentRecord(UUID studentID, Gradu } BeanUtils.copyProperties(sourceObject, gradEntity, CREATE_USER, CREATE_DATE); + gradEntity.setUpdateDate(null); + gradEntity.setUpdateUser(null); gradEntity = graduationStatusRepository.saveAndFlush(gradEntity); if (ongoingUpdate) { - historyService.createStudentHistory(sourceObject, UPDATE_ONGOING_HISTORY_ACTIVITY_CODE); + historyService.createStudentHistory(gradEntity, UPDATE_ONGOING_HISTORY_ACTIVITY_CODE); } if (constants.isStudentGuidPenXrefEnabled() && StringUtils.isNotBlank(graduationStatus.getPen())) { saveStudentGuidPenXref(gradEntity.getStudentID(), graduationStatus.getPen());