diff --git a/projects/workforce-allocations-to-delius/src/dev/resources/simulations/__files/get-event-allocation-body.json b/projects/workforce-allocations-to-delius/src/dev/resources/simulations/__files/get-event-allocation-body.json index f3c015246e..c000fa5ddf 100644 --- a/projects/workforce-allocations-to-delius/src/dev/resources/simulations/__files/get-event-allocation-body.json +++ b/projects/workforce-allocations-to-delius/src/dev/resources/simulations/__files/get-event-allocation-body.json @@ -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" } \ No newline at end of file diff --git a/projects/workforce-allocations-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/AllocateEventIntegrationTest.kt b/projects/workforce-allocations-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/AllocateEventIntegrationTest.kt index d2fb8793f3..faa5e96f0c 100644 --- a/projects/workforce-allocations-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/AllocateEventIntegrationTest.kt +++ b/projects/workforce-allocations-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/AllocateEventIntegrationTest.kt @@ -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 } diff --git a/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/workforceallocations/AllocationDetail.kt b/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/workforceallocations/AllocationDetail.kt index 5a7ba15ed8..bc81ad41ad 100644 --- a/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/workforceallocations/AllocationDetail.kt +++ b/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/workforceallocations/AllocationDetail.kt @@ -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) diff --git a/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AllocateEventService.kt b/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AllocateEventService.kt index 8f00f4f066..ae14877b76 100644 --- a/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AllocateEventService.kt +++ b/projects/workforce-allocations-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/AllocateEventService.kt @@ -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 ) ) }