From 3d2745f6fbc49b59593906df8c01ef12594e2d8c Mon Sep 17 00:00:00 2001 From: benedwards Date: Tue, 27 Aug 2024 16:11:06 +0100 Subject: [PATCH] Fixed issue where attendance audit number would incorrectly be added --- .../hmcts/juror/api/moj/service/trial/TrialServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/hmcts/juror/api/moj/service/trial/TrialServiceImpl.java b/src/main/java/uk/gov/hmcts/juror/api/moj/service/trial/TrialServiceImpl.java index 33924da89..369c8efa8 100644 --- a/src/main/java/uk/gov/hmcts/juror/api/moj/service/trial/TrialServiceImpl.java +++ b/src/main/java/uk/gov/hmcts/juror/api/moj/service/trial/TrialServiceImpl.java @@ -266,9 +266,10 @@ public void returnJury(BureauJwtPayload payload, String trialNumber, String loca if (appearance.getTimeOut() == null && StringUtils.isNotEmpty(returnJuryDto.getCheckOut())) { appearance.setAppearanceStage(AppearanceStage.EXPENSE_ENTERED); appearance.setTimeOut(LocalTime.parse(returnJuryDto.getCheckOut())); + //Only give them an attendance number if they were checked out via this process + appearance.setAttendanceAuditNumber("J" + attendanceAuditNumber); log.debug("setting time out for juror %s".formatted(jurorNumber)); } - appearance.setAttendanceAuditNumber("J" + attendanceAuditNumber); appearance.setTrialNumber(trialNumber); appearance.setSatOnJury(true); jurorAppearanceService.realignAttendanceType(appearance);