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

Fix order of return versions in view licence #1251

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Aug 9, 2024

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

Part of the work to replace NALD for handling return requirements

Spotted in testing is that if a licence has 2 return versions with the same start date (one will be 'approved' and the other will display as 'replaced'), it is possible that they will be ordered incorrectly. In this scenario, the 'approved' should be first in the table, followed by 'replaced'.

We had exactly the same issue with charge versions. The solution was to order them first by start date, then by version number. So, we apply the same sorting to when we fetch the return versions.

Before

Screenshot 2024-08-09 at 16 02 31

After

Screenshot 2024-08-09 at 16 21 55

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

> Part of the work to replace NALD for handling return requirements

Spotted in testing is that if a licence has 2 return versions with the same start date (one will be 'approved' and the other will display as 'replaced'), it is possible that they will be ordered incorrectly. In this scenario, the 'approved' should be first in the table and then the 'replaced'.

We had exactly the [same issue with charge versions](#1162). The solution was to order them first by start date, then by version number. So, we apply the same sorting to when we fetch the return versions.
@Cruikshanks Cruikshanks added the bug Something isn't working label Aug 9, 2024
@Cruikshanks Cruikshanks self-assigned this Aug 9, 2024
@Cruikshanks Cruikshanks force-pushed the fix-order-of-return-versions branch from bd1cdda to 125a17c Compare August 9, 2024 15:20
@Cruikshanks Cruikshanks marked this pull request as ready for review August 9, 2024 15:50
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

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

@Cruikshanks Cruikshanks merged commit 8a3f017 into main Aug 12, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the fix-order-of-return-versions branch August 12, 2024 20:07
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