From eaa39b87cf1ba5f85c1e71d6a47a3843c629a0d5 Mon Sep 17 00:00:00 2001 From: Jason Claxton Date: Fri, 27 Sep 2024 14:31:30 +0100 Subject: [PATCH] Incorrect status showing on licence set up page https://eaflood.atlassian.net/browse/WATER-4671 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Carrying on from the issue that was fixed in https://github.com/DEFRA/water-abstraction-system/pull/1363 another issue has been found with the status. The problem can be recreated by: 1. New requirements added with a start date of 01/04/2022 that will have no end date. 2. Another new requirement is added with a start date 1 day later on the 02/04/2022. This will put an end date on the one created in step 1. of 01/04/2022. So the first will start and end on the same day. 3. Set up another new requirement with a start date of the 01/04/2022. This new requirement should replace the first but instead is just added and does not replace anything. There are 2 issues that together appear to be causing this problem. The first was the order in which the checks were being carried out to see where the new return fitted in. The second was that it wasn’t expecting a return with a start and end date to be the same. This PR should fix those problems.