[APB-11327] add riskingCompletedDate when all risking results receive…#66
Merged
gitwojciech merged 8 commits intomainfrom May 7, 2026
Merged
[APB-11327] add riskingCompletedDate when all risking results receive…#66gitwojciech merged 8 commits intomainfrom
gitwojciech merged 8 commits intomainfrom
Conversation
paweldigital
reviewed
May 6, 2026
| for | ||
| appDate <- application.riskingCompletedDate | ||
| individualDates <- individuals.map(_.riskingCompletedDate).toList.sequence | ||
| yield individualDates.foldLeft(appDate)((latest, d) => if d.isAfter(latest) then d else latest) |
Contributor
There was a problem hiding this comment.
Could you rewrite this with simpler (appDate :: individualDates).max please
paweldigital
reviewed
May 6, 2026
| ): | ||
|
|
||
| /** Latest moment a Minerva result landed across the entity and all individuals. None if any record is still missing its `riskingCompletedDate`. */ | ||
| def latestRiskingCompletedDate: Option[Instant] = |
Contributor
There was a problem hiding this comment.
This is used only in one place - could you move this to the controller please?
Maybe we can just name it riskingCompletedDate - that should be self explanatory enough so a Scala comment won’t be required.
paweldigital
reviewed
May 6, 2026
Comment on lines
+35
to
+36
| failures: Option[List[IndividualFailure]], | ||
| riskingCompletedDate: Option[Instant] |
Contributor
There was a problem hiding this comment.
In this implementation, it is possible to have empty failures while still having a defined riskingCompletedDate.
Could we remodel it to include the date together with riskingResults? Maybe something like
final case class IndividualFailures(
failures: List[IndividualFailure],
receivedDate: Instant
)
//then
...
failures: Option[IndividualFailures],
Contributor
Author
There was a problem hiding this comment.
yes - same as before List.empty
…d from risking, PR 1
…d from risking, PR 2
…d from risking, PR 3
…d from risking, PR 4
…d from risking, PR 5
…d from risking, PR 6
…d from risking, PR 7
paweldigital
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…d from risking