Skip to content

Commit

Permalink
Merge pull request #623 from bcgov/2.0.3
Browse files Browse the repository at this point in the history
2.0.3
  • Loading branch information
ychung-mot authored Sep 15, 2021
2 parents 82c5e48 + dc7d59b commit 036e496
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion api/Hmcr.Data/Repositories/RockfallReportRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ public async IAsyncEnumerable<HmrRockfallReport> SaveRockfallReportAsnyc(HmrSubm
{
rockfallReport.RockfallReportTyped.SubmissionObjectId = submission.SubmissionObjectId;

//HMCR-1063 Rockfall reports with same MCRR numbers submitted for different service areas were over writing the original
// changed it from PartyID to ContractTermID which handles the service area and party distinction
var entity = await DbSet
.Where(x => x.SubmissionObject.PartyId == submission.PartyId && x.McrrIncidentNumber == rockfallReport.RockfallReportTyped.McrrIncidentNumber)
//.Where(x => x.SubmissionObject.PartyId == submission.PartyId && x.McrrIncidentNumber == rockfallReport.RockfallReportTyped.McrrIncidentNumber)
.Where(x => x.SubmissionObject.ContractTermId == submission.ContractTermId && x.McrrIncidentNumber == rockfallReport.RockfallReportTyped.McrrIncidentNumber)
.FirstOrDefaultAsync();

if (entity == null)
Expand Down
6 changes: 5 additions & 1 deletion api/Hmcr.Data/Repositories/WorkReportRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ public async IAsyncEnumerable<HmrWorkReport> SaveWorkReportAsnyc(HmrSubmissionOb
{
workReport.WorkReportTyped.SubmissionObjectId = submission.SubmissionObjectId;

//HMCR-1063 Rockfall reports with same MCRR numbers submitted for different service areas were over writing the original
// Investigation determined that this was also a possible issue for Work Reports
// changed it from PartyID to ContractTermID which handles the service area and party distinction
var entity = await DbSet
.Where(x => x.SubmissionObject.PartyId == submission.PartyId && x.RecordNumber == workReport.WorkReportTyped.RecordNumber)
//.Where(x => x.SubmissionObject.PartyId == submission.PartyId && x.RecordNumber == workReport.WorkReportTyped.RecordNumber)
.Where(x => x.SubmissionObject.ContractTermId == submission.ContractTermId && x.RecordNumber == workReport.WorkReportTyped.RecordNumber)
.FirstOrDefaultAsync();

if (entity == null)
Expand Down
2 changes: 1 addition & 1 deletion openshift/configmaps/api-appsettings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ objects:
{
"AllowedHosts": "*",
"Constants": {
"Version": "2.0.2.0",
"Version": "2.0.3.0",
"SwaggerApiUrl": "/swagger/v1/swagger.json"
},
"Serilog": {
Expand Down

0 comments on commit 036e496

Please sign in to comment.