From 25840f4a489b9c6b67b10c97a053c7820c7037c7 Mon Sep 17 00:00:00 2001 From: Amardeep Chimber Date: Wed, 16 Oct 2024 20:33:57 +0100 Subject: [PATCH] MAN-28 - update LicenceConditionNote.createdBy --- .../uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt | 4 ++-- .../uk/gov/justice/digital/hmpps/service/SentenceService.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt index 950c4a9f47..d8ee1401fa 100644 --- a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt +++ b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt @@ -124,7 +124,7 @@ class SentenceIntegrationTest { LocalDate.now(), listOf( LicenceConditionNote( - "Comment added by CVL Service on 22/04/2024 at 10:00", + "Comment added by CVL Service", """ Licence Condition created automatically from the Create and Vary a licence system of Allow person(s) as designated by your supervising officer to install an electronic monitoring tag on you and access to install any associated equipment in your property, and for the purpose of ensuring that equipment is functioning correctly. You must not damage or tamper with these devices and ensure that the tag is charged, and report to your supervising officer and the EM provider immediately if the tag or the associated equipment are not working correctly. This will be for the purpose of monitoring your alcohol abstinence licence condition(s) unless otherwise authorised by your supervising officer. @@ -132,7 +132,7 @@ class SentenceIntegrationTest { false ), LicenceConditionNote( - "Comment added by Joe Root on 23/04/2024 at 13:45", + "Comment added by Joe Root", """ You must not drink any alcohol until Wednesday 7th August 2024 unless your probation officer says you can. You will need to wear an electronic tag all the time so diff --git a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt index 8a2f21666f..e315557c25 100644 --- a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt +++ b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt @@ -100,7 +100,7 @@ class SentenceService( LicenceConditionNote( - addedBy?.removeSuffix(System.lineSeparator()), + addedBy?.removeSuffix(System.lineSeparator())?.reversed()?.substring(23)?.reversed(), noteText.removeSuffix(System.lineSeparator()), note.let { n -> when {