diff --git a/api/Hmcr.Data/Repositories/RockfallReportRepository.cs b/api/Hmcr.Data/Repositories/RockfallReportRepository.cs index 4cfa4f93..8b593c6b 100644 --- a/api/Hmcr.Data/Repositories/RockfallReportRepository.cs +++ b/api/Hmcr.Data/Repositories/RockfallReportRepository.cs @@ -27,8 +27,11 @@ public async IAsyncEnumerable 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) diff --git a/api/Hmcr.Data/Repositories/WorkReportRepository.cs b/api/Hmcr.Data/Repositories/WorkReportRepository.cs index b91a48e7..a62c6913 100644 --- a/api/Hmcr.Data/Repositories/WorkReportRepository.cs +++ b/api/Hmcr.Data/Repositories/WorkReportRepository.cs @@ -35,8 +35,12 @@ public async IAsyncEnumerable 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) diff --git a/openshift/configmaps/api-appsettings.yaml b/openshift/configmaps/api-appsettings.yaml index 413029d6..36173553 100644 --- a/openshift/configmaps/api-appsettings.yaml +++ b/openshift/configmaps/api-appsettings.yaml @@ -9,7 +9,7 @@ objects: { "AllowedHosts": "*", "Constants": { - "Version": "2.0.2.0", + "Version": "2.0.3.0", "SwaggerApiUrl": "/swagger/v1/swagger.json" }, "Serilog": {