From 0a2654b65c3fbe49cb25132fd538cc22ab69c1ab Mon Sep 17 00:00:00 2001 From: Dominic NEED Date: Mon, 20 Nov 2023 14:14:50 +0000 Subject: [PATCH] Updated as the logic sits a year behind --- .../Utils/KeyStageDataStatusHelper.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Utils/KeyStageDataStatusHelper.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Utils/KeyStageDataStatusHelper.cs index 2697c4ec2..76d072b23 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Utils/KeyStageDataStatusHelper.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Utils/KeyStageDataStatusHelper.cs @@ -49,9 +49,11 @@ public static string KeyStage4DataTag(DateTime date) public static string DetermineKeyStageDataStatus(DateTime date, KeyStages keyStage) { - bool isItCurrentAcademicYear = (date.Month < 9 && date.Year == DateTime.Now.Year) || - (date.Month >= 9 && date.Year == DateTime.Now.Year - 1); - StatusType statusType = isItCurrentAcademicYear ? DetermineStatusType(date, keyStage) : StatusType.Final; + bool isItCurrentOrLastAcademicYear = + (date.Month < 9 && date.Year == DateTime.Now.Year) || + (date.Month < 9 && date.Year == DateTime.Now.Year - 1) || + (date.Month >= 9 && date.Year == DateTime.Now.Year - 2); + StatusType statusType = isItCurrentOrLastAcademicYear ? DetermineStatusType(date, keyStage) : StatusType.Final; return statusType.ToString(); }