Skip to content

Commit

Permalink
Merge pull request #599 from bcgov/feature/Grad2-2341RecordAuditHisto…
Browse files Browse the repository at this point in the history
…ryStudentFlagsEdit

Grad2-2341 part-6 Setting the flags as per validations
  • Loading branch information
arybakov-cgi authored Dec 6, 2023
2 parents dd75e14 + 9c2d862 commit b767d7c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,12 @@ public Pair<GraduationStudentRecord, GradStatusEvent> updateGraduationStatus(UUI
} else {
deleteStudentAchievements(sourceObject.getStudentID(), accessToken);
}
} else {
}

BeanUtils.copyProperties(sourceObject, gradEntity, CREATE_USER, CREATE_DATE, "studentGradData", "studentProjectedGradData", "recalculateGradStatus", "recalculateProjectedGrad");
gradEntity.setProgramCompletionDate(sourceObject.getProgramCompletionDate());
gradEntity.setUpdateUser(null);
if(!hasDataChanged.hasDataChanged()) {
if ("".equals(sourceObject.getRecalculateGradStatus()) || "N".equalsIgnoreCase(sourceObject.getRecalculateGradStatus())) {
gradEntity.setRecalculateGradStatus(null);
} else {
Expand All @@ -232,11 +237,6 @@ public Pair<GraduationStudentRecord, GradStatusEvent> updateGraduationStatus(UUI
gradEntity.setRecalculateProjectedGrad(sourceObject.getRecalculateProjectedGrad());
}
}


BeanUtils.copyProperties(sourceObject, gradEntity, CREATE_USER, CREATE_DATE, "studentGradData", "studentProjectedGradData", "recalculateGradStatus", "recalculateProjectedGrad");
gradEntity.setProgramCompletionDate(sourceObject.getProgramCompletionDate());
gradEntity.setUpdateUser(null);
gradEntity = graduationStatusRepository.saveAndFlush(gradEntity);
historyService.createStudentHistory(gradEntity, USER_EDIT);
final GradStatusEvent gradStatusEvent = createGradStatusEvent(gradEntity.getUpdateUser(), gradEntity,
Expand Down

0 comments on commit b767d7c

Please sign in to comment.