-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix rate history contract revisions #2002
Conversation
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.
code changes LGTM
@@ -165,42 +166,58 @@ function rateWithHistoryToDomainModel( | |||
) | |||
} | |||
|
|||
// if it's from before this rate was submitted, it's there at the beginning. | |||
// Finding the single earliest contract rev submitted right after rate rev submission date time. |
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.
This comment confuses me. Isn't this code finding multiple revs not just a single contract rev? Seems like we adding any contract rev that was submitted after rate rev to initialEntry.contractRevs
with an array push.
Also why are keeping all this commented old code along? I think we can delete - its in version history.
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.
This is building the rate history using the rate.revisions
in the type RateType
.
- Since
rate.revisions
are all submitted rates, we need to attach the single contract revision that was submitted along with this rate to preserve the same submission data at that time. - We don't want future submission revisions of the same contract attached to it otherwise, this data would have future edits trickle down the revision history.
Let me know if that makes sense.
) | ||
|
||
// Each Revision needs a Reason, one of the contracts or revisions associated with it should have changed and why. | ||
// Expect no draft revision | ||
expect(latestRateTwoResubmit.draftRevision).toBeUndefined() |
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.
Good to test this
Summary
Fixes rate history revisions contract data.
This fix refactors
rateWithHistoryToDomainModel
to only include the earliest submitted contract after the rate revision submissionsubmitInfo.updatedAt
. Any proceeding contract revision with the samecontractID
will be skipped.There was a discussion in DTBM 10.24.23 around the
Submission this rate was submitted with
and if it should link to the latest submission summary or the submission summary that this rate was submitted with. Specifically, when a rate was removed, the summary is still linked to the latest submission summary.Related issues
Screenshots
Test cases covered
QA guidance