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

Add orderBy to data fetched for two-part tariff review #1131

Merged
merged 4 commits into from
Jun 21, 2024

Conversation

Beckyrose200
Copy link
Contributor

@Beckyrose200 Beckyrose200 commented Jun 21, 2024

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

During the writing of the acceptance tests for the two-part tariff review pages, we realised there was no ordering on the data being pulled out and displayed. The review licence page fetched the charge versions, charge references, charge elements and returns for a two-part tariff licence. Some licences can have multiple or all of these. With no order happening on the review pages, this makes the acceptance tests difficult to write as they pass for one person's local environment but fail on another because they are being pulled out in different orders. This PR is to add some ordering on the pages.

  • The charge versions are being ordered by their start dates.
  • The charge references are ordered by the highest subsistence charge
  • The charge elements are being ordered by the highest authorised volume
  • The returns are being ordered by their start dates.

During the writing of the acceptance tests for the two-part tariff review pages, we realised there was no ordering on the data being pulled out and displayed. The review licence page fetched the charge versions, charge references, charge elements and returns for a two-part tariff licence. Some licences can have multiple or all of these. With no ordering happening on the review pages, this makes the acceptance tests difficult to right as they pass for one persons local environment but fails on another persons because they are being pulled out in different orders. This PR is to add some ordering on the pages.
@Beckyrose200 Beckyrose200 added the enhancement New feature or request label Jun 21, 2024
@Beckyrose200 Beckyrose200 self-assigned this Jun 21, 2024
@Beckyrose200 Beckyrose200 marked this pull request as ready for review June 21, 2024 10:49
@Beckyrose200 Beckyrose200 requested a review from Cruikshanks June 21, 2024 10:49
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.

@Beckyrose200 Beckyrose200 merged commit be3ea9a into main Jun 21, 2024
6 checks passed
@Beckyrose200 Beckyrose200 deleted the 2pt-review-pages-fetch branch June 21, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants