Skip to content

Commit

Permalink
Fix PNO to verify number
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Aug 13, 2024
1 parent 5355867 commit f821bbe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ class JpaLogbookReportRepository(
}
}.filter {
it.logbookMessageAndValue.value.isInVerificationScope == true &&
it.logbookMessageAndValue.value.isVerified == false
it.logbookMessageAndValue.value.isVerified == false &&
(
it.logbookMessageAndValue.value.isInvalidated == null ||
it.logbookMessageAndValue.value.isInvalidated == false
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class JpaManualPriorNotificationRepository(
willArriveAfter = CustomZonedDateTime(ZonedDateTime.now()).toString(),
willArriveBefore = CustomZonedDateTime(ZonedDateTime.now().plusHours(24)).toString(),
).filter {
it.value.isInVerificationScope == true && it.value.isVerified == false
it.value.isInVerificationScope == true &&
it.value.isVerified == false &&
(it.value.isInvalidated == null || it.value.isInvalidated == false)
}
.map {
it.toPriorNotification()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@ class JpaLogbookReportRepositoryITests : AbstractDBTests() {
assertThat(result).hasSizeGreaterThan(0)
assertThat(result.all { it.logbookMessageAndValue.value.isVerified == false }).isTrue()
assertThat(result.all { it.logbookMessageAndValue.value.isInVerificationScope == true }).isTrue()
assertThat(result.all { it.logbookMessageAndValue.value.isInvalidated == null }).isTrue()
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ class JpaManualPriorNotificationRepositoryITests : AbstractDBTests() {
assertThat(result).hasSizeGreaterThan(0)
assertThat(result.filter { it.logbookMessageAndValue.value.isVerified == false }).hasSize(1)
assertThat(result.filter { it.logbookMessageAndValue.value.isInVerificationScope == true }).hasSize(1)
assertThat(result.filter { it.logbookMessageAndValue.value.isInvalidated == null }).hasSize(1)
}

@Test
Expand Down

0 comments on commit f821bbe

Please sign in to comment.