-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fetching the charge versions data #15
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://eaflood.atlassian.net/jira/software/c/projects/WATER/boards/96?modal=detail&selectedIssue=WATER-3787 Here we are fetching the charge versions data from our database.
Jozzey
added a commit
that referenced
this pull request
Nov 9, 2022
https://eaflood.atlassian.net/browse/WATER-3787 Some migrations scripts are required to create the tables/data for the unit tests in this PR #15 in order for the build process to pass. As no migrations process had yet been set up on this application. This PR has been created to build the migrations process as well as populate the test database with the data required for the PR mentioned above. This migration process has been based on that used by the [Charging Module](https://github.com/DEFRA/sroc-charging-module-api).
Jozzey
approved these changes
Nov 10, 2022
Cruikshanks
added a commit
that referenced
this pull request
Nov 11, 2022
https://eaflood.atlassian.net/browse/WATER-3787 In [Fetching the charge versions data](#15) we added a new service to start selecting scharge versions to be included in the Supplementary Bill run. But at the moment, it's only filter is all charge versions with the `scheme` SROC. We have test data and scenarios to work with so we can now start implementing the filter 'for real'. This is the start of the process. We expect it's likely we'll be finessing the filter in subsequent PR's. But this gets the ball rolling.
Cruikshanks
added a commit
that referenced
this pull request
Nov 15, 2022
https://eaflood.atlassian.net/browse/WATER-3787 In [Fetching the charge versions data](#15) we added a new service to start selecting charge versions to be included in the Supplementary Bill run. But at the moment, its only filter is all charge versions with the `scheme` SROC. We have test data and scenarios to work with so we can now start implementing the filter 'for real'. This is the start of the process. We expect it's likely we'll be finessing the filter in subsequent PRs. But this gets the ball rolling. In this change, we are starting to filter the charge versions by - are they linked to a licence that has been marked `include_in_supplementary_billing` - are they 'current', which we have determined by whether `end_date` is populated (because `status` doesn't work) ** Notes - Add migrations for 'water.licences' and 'water.charge_versions' tables The `include_in_supplementary_billing` flag is in the `licences` table and not the `charge_versions` table. This means we can't just rely on checking the charge versions table and will need to build a licences table for our testing. We also add a migration to add `licence_id` and `end_date` fields to the charge versions table. `licence_id` is how the 2 tables are linked and `end_date` is what we are having to rely on to determine the 'current' charge version. - Expand the test data helper support We add a new `LicenceHelper` as our query now needs these linked to charge versions. Rather than have our tests repeatedly set this up we have the charge version helper automatically call the licence helper and manage linking the 2 records. Adding the licence also means we need to start passing a bunch of data around now. So, we go with some defaults. We thought we might need a `RegionHelper` so added that as well. Turns out we didn't, but we expect to in the future so left it in. Co-authored-by: Jason Claxton <[email protected]> Co-authored-by: Stuart Adair <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://eaflood.atlassian.net/jira/software/c/projects/WATER/boards/96?modal=detail&selectedIssue=WATER-3787
Here we are fetching the charge versions data from our database.