Skip to content

Commit

Permalink
PI-2336: Cater for new response data for spo contact (#4158)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcphee77 authored Aug 9, 2024
1 parent 2510e81 commit cfef06a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"createdBy": "Smith, Bob",
"createdDate": "2022-07-28T10:30:54.023+01:00",
"eventNumber": 1,
"sensitiveNotes": false
"sensitiveNotes": false,
"sensitiveOversightNotes": false,
"spoOversightNotes": "Spo oversight notes"
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ class AllocateEventIntegrationTest {
assertThat(spoContact!!.staffId, equalTo(staffId))
assertThat(
spoContact.isSensitive,
equalTo((allocationDetail as AllocationDetail.EventAllocation).sensitive)
equalTo((allocationDetail as AllocationDetail.EventAllocation).sensitiveOversightNotes)
)
assertThat(spoContact.notes, equalTo(allocationDetail.notes))
assertThat(spoContact.notes, equalTo(allocationDetail.spoOversightNotes))
} else {
val cadeContact = contactRepository.findAll()
.firstOrNull { it.eventId == oldOm.eventId && it.type.code == ContactTypeCode.CASE_ALLOCATION_DECISION_EVIDENCE.value }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ sealed interface AllocationDetail {
override val code: String = "INT",
@JsonAlias("allocationJustificationNotes")
val notes: String?,
val spoOversightNotes: String?,
val spoStaffCode: String?,
@JsonAlias("sensitiveNotes")
val sensitive: Boolean?
val sensitive: Boolean?,
val sensitiveOversightNotes: Boolean?,
) : AllocationDetail

@JsonDeserialize(using = JsonDeserializer.None::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class AllocateEventService(
teamId = orderManager.team.id,
staffId = spoStaff?.id ?: orderManager.staff.id,
providerId = orderManager.provider.id,
notes = allocationDetail.notes,
isSensitive = allocationDetail.sensitive ?: true
notes = allocationDetail.spoOversightNotes,
isSensitive = allocationDetail.sensitiveOversightNotes ?: true
)
)
}
Expand Down

0 comments on commit cfef06a

Please sign in to comment.