Skip to content

Commit 036e496

Browse files
authored
Merge pull request #623 from bcgov/2.0.3
2.0.3
2 parents 82c5e48 + dc7d59b commit 036e496

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

api/Hmcr.Data/Repositories/RockfallReportRepository.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ public async IAsyncEnumerable<HmrRockfallReport> SaveRockfallReportAsnyc(HmrSubm
2727
{
2828
rockfallReport.RockfallReportTyped.SubmissionObjectId = submission.SubmissionObjectId;
2929

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

3437
if (entity == null)

api/Hmcr.Data/Repositories/WorkReportRepository.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ public async IAsyncEnumerable<HmrWorkReport> SaveWorkReportAsnyc(HmrSubmissionOb
3535
{
3636
workReport.WorkReportTyped.SubmissionObjectId = submission.SubmissionObjectId;
3737

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

4246
if (entity == null)

openshift/configmaps/api-appsettings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ objects:
99
{
1010
"AllowedHosts": "*",
1111
"Constants": {
12-
"Version": "2.0.2.0",
12+
"Version": "2.0.3.0",
1313
"SwaggerApiUrl": "/swagger/v1/swagger.json"
1414
},
1515
"Serilog": {

0 commit comments

Comments
 (0)