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 charge vers. in view licence - again! #1168

Merged
merged 3 commits into from
Jul 5, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Jul 5, 2024

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

Part of the work to replace the legacy view licence page

We thought we'd nailed the ordering of the charge versions in the new licence setup tab of our new view licence screen in Fix order of charge versions in view licence page.

However, it's still not quite right. The previous fix assumed a 'superseded' charge version would always have an end date. However, it turns out this is not always the case. If followed by a 'current' charge version that also has an end date (because another has been added after it), sorting by end date means the 'current' comes after the 'superseded'.

Having double-checked the legacy code, they are sorting by start date, then version number. As it is the legacy view's order we're trying to match, we're just going to crack on and make the change to do the same thing.

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

> Part of the work to replace the legacy view licence page

We thought we'd nailed the ordering of the charge versions in the new licence setup tab of our new view licence screen in [Fix order of charge versions in view licence page](#1162).

However, it's still not quite right. The previous fix assumed a 'superseded' charge version would always have an end date. However, it turns out this is not always the case. If followed by a 'current' charge version that also has an end date (because another has been added after it), sorting by end date means the 'current' comes after the 'superseded'.

Having double checked the legacy code they have are sorting by start date then version number. As it is the legacy view's order we're trying to match, we're just going to crack on and make the change to do the same thing.
@Cruikshanks Cruikshanks added the bug Something isn't working label Jul 5, 2024
@Cruikshanks Cruikshanks self-assigned this Jul 5, 2024
@Cruikshanks Cruikshanks force-pushed the fix-charge-version-order-attempt-2 branch from 8ace490 to 492b5cc Compare July 5, 2024 16:53
@Cruikshanks Cruikshanks marked this pull request as ready for review July 5, 2024 17:12
@Cruikshanks Cruikshanks merged commit d778fc1 into main Jul 5, 2024
5 checks passed
@Cruikshanks Cruikshanks deleted the fix-charge-version-order-attempt-2 branch July 5, 2024 17:13
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.

1 participant