Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAD2-2645: task is complete. #677

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

public enum FieldName {
SCHOOL_OF_RECORD,
SCHOOL_OF_RECORD_ID,
GRAD_PROGRAM,
ADULT_START_DATE,
SLP_DATE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

public enum FieldType {
STRING,
DATE
DATE,
GUID
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class GraduationStudentRecord extends BaseModel {
private String honoursStanding;
private String recalculateGradStatus;
private String schoolOfRecord;
private UUID schoolOfRecordId;
private String schoolName;
private String studentGrade;
private String studentStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ private void populate(OngoingUpdateFieldDTO field, GraduationStudentRecordEntity
log.info(ONGOING_UPDATE_FIELD_STR, field, targetObject.getSchoolOfRecord());
targetObject.setSchoolOfRecord(getStringValue(field.getValue()));
}
case SCHOOL_OF_RECORD_ID -> {
log.info(ONGOING_UPDATE_FIELD_STR, field, targetObject.getSchoolOfRecordId());
targetObject.setSchoolOfRecordId(getGuidValue(field.getValue()));
}
case GRAD_PROGRAM -> {
log.info(ONGOING_UPDATE_FIELD_STR, field, targetObject.getProgram());
targetObject.setProgram(getStringValue(field.getValue()));
Expand Down Expand Up @@ -353,6 +357,11 @@ private String getStringValue(Object value) {
return (String) value;
}

private UUID getGuidValue(Object value) {
String strGuid = getStringValue(value);
return strGuid != null? UUID.fromString(strGuid) : null;
}

private StudentOptionalProgramEntity handleExistingOptionalProgram(StudentOptionalProgramRequestDTO studentOptionalProgramReq, StudentOptionalProgramEntity gradEntity) {
if (studentOptionalProgramReq.getStudentOptionalProgramData() != null) {
gradEntity.setStudentOptionalProgramData(studentOptionalProgramReq.getStudentOptionalProgramData());
Expand Down
Loading