Skip to content

Commit

Permalink
Merge pull request #494 from bcgov/grad-release
Browse files Browse the repository at this point in the history
Grad release 1.21.0
  • Loading branch information
githubmamatha authored Jun 19, 2024
2 parents fda090b + 8196c4e commit 45f1362
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-batch-graduation-api</artifactId>
<version>1.8.63</version>
<version>1.8.64</version>
<name>educ-grad-batch-graduation-api</name>
<description>Ministry of Education GRAD BATCH GRADUATION API</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import ca.bc.gov.educ.api.batchgraduation.model.DistributionSummaryDTO;
import ca.bc.gov.educ.api.batchgraduation.model.StudentCredentialDistribution;
import ca.bc.gov.educ.api.batchgraduation.rest.RestUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemProcessor;
Expand All @@ -29,10 +28,13 @@ public StudentCredentialDistribution process(StudentCredentialDistribution item)
LOGGER.info("Processing partitionData = {}", item.getCredentialTypeCode());
summaryDTO.setBatchId(batchId);
boolean useSchoolAtGrad = false;
//--> Revert code back to school of record GRAD2-2758
/**
String credentialType = summaryDTO.getCredentialType();
if (StringUtils.equalsAnyIgnoreCase(credentialType, "OC", "RC")) {
useSchoolAtGrad = true;
}
} **/
//<--
return restUtils.processDistribution(item, summaryDTO, useSchoolAtGrad);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public class DistributionRunYearlyProcessor implements ItemProcessor<StudentCred
public StudentCredentialDistribution process(StudentCredentialDistribution item) throws Exception {
LOGGER.info("Processing partitionData = {}", item.getCredentialTypeCode());
summaryDTO.setBatchId(batchId);
return restUtils.processDistribution(item, summaryDTO, true);
//--> Revert code back to school of record GRAD2-2758 (set useSchoolAtGrad to false)
return restUtils.processDistribution(item, summaryDTO, false);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ private StudentCredentialDistribution populateStudentCredentialDistribution(Repo
}
dist.setStudentID(data.getGraduationStudentRecordId());
dist.setPaperType(paperType);
dist.setSchoolOfRecord(StringUtils.isBlank(data.getMincodeAtGrad()) ? data.getMincode() : data.getMincodeAtGrad());
//--> Revert code back to school of record GRAD2-2758
/** dist.setSchoolOfRecord(StringUtils.isBlank(data.getMincodeAtGrad()) ? data.getMincode() : data.getMincodeAtGrad()); **/
dist.setSchoolOfRecord(data.getMincode());
//<--
dist.setSchoolAtGrad(data.getMincodeAtGrad());
dist.setSchoolOfRecordOrigin(data.getMincode());
dist.setDocumentStatusCode("COMPL");
Expand Down

0 comments on commit 45f1362

Please sign in to comment.