-
Notifications
You must be signed in to change notification settings - Fork 43
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
[PIMS-227] Fix: Buildings disassociating from land #1698
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1698 +/- ##
==========================================
+ Coverage 64.52% 64.70% +0.17%
==========================================
Files 419 419
Lines 13397 13397
Branches 1278 1278
==========================================
+ Hits 8645 8668 +23
+ Misses 4326 4303 -23
Partials 426 426
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Code Climate has analyzed commit 3314016 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 53.8%. View more on Code Climate. |
@@ -399,6 +399,7 @@ public Building UpdateFinancials(Building building) | |||
{ | |||
this.Context.SetOriginalRowVersion(existingBuilding); | |||
this.Context.UpdateBuildingFinancials(existingBuilding, building.Evaluations, building.Fiscals); | |||
existingBuilding.ClassificationId = building.ClassificationId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the simplicity of the fix! Nice work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the saving of parcel and building financials from the Property List View, and all seems good.
|
🎯 Summary
PIMS-227:
Issue:
When updating buildings from the View Inventory page, it was causing some fields, including associated land parcels, to be cleared or reset to default values.
This was because that information is never loaded on the page and was therefore sent back to the API without it, which interpreted it as intentionally removed.
Changes:
ClassificationId
and removed the attempted update toClassification
.ClassificationId
is the foreign key and should be updated instead.Testing instructions:
🔰 Checklist