Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect status showing on licence set up page #1363

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Sep 26, 2024

https://eaflood.atlassian.net/browse/WATER-4671

An issue has been found during QA where if you find a licence that has no existing returns. Then create 2 or 3 "no return required" journeys followed by a new "return required" journey. That the statuses are not updating correctly.

This problem is related to the issue that wasn't quite fixed in this PR #1325

The problem was caused by the logic that determines if there are previous return versions. Previously, it relied on the session data. However, this has proved unreliable when returns have been generated via the "no returns required" journey. Therefore, I have amended this logic to check the actual return_versions table rather than the session data.

https://eaflood.atlassian.net/browse/WATER-4671

An issue has been found during QA where if you find a licence that has no existing returns. Then create 2 or 3 "no return required" journeys followed by a new "return required" journey. That the statuses are not updating correctly.

This PR will fix the issue.
@Jozzey Jozzey added the bug Something isn't working label Sep 26, 2024
@Jozzey Jozzey self-assigned this Sep 26, 2024
@Jozzey Jozzey marked this pull request as ready for review September 26, 2024 15:12
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jozzey Jozzey merged commit dfc15df into main Sep 26, 2024
6 checks passed
@Jozzey Jozzey deleted the fix-licence-setup-page-status branch September 26, 2024 15:41
Jozzey added a commit that referenced this pull request Sep 27, 2024
https://eaflood.atlassian.net/browse/WATER-4671

Carrying on from the issue that was fixed in #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.
Jozzey added a commit that referenced this pull request Sep 27, 2024
https://eaflood.atlassian.net/browse/WATER-4671

Carrying on from the issue that was fixed in #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.

![Screenshot 2024-09-27 at 14 20 04](https://github.com/user-attachments/assets/fd042ba6-fcad-4b73-887d-4a59b1a9ce73)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants