-
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
Add new fetch bill licence service #501
Conversation
https://eaflood.atlassian.net/browse/WATER-4156 Related to WATER-4155 and the work to replace the legacy bill page with our own we're now starting to build the page it will link to; a view of the bill licence and all its transactions. This adds a service that will get the data need for the page. Mainly that is the transaction detail but also information about the bill and licence needed for context in the page. One thing to note is the service makes no distinction between SROC and PRESROC. But some linked entities and fields are only used when a transaction is one or the other.
It is expected that tests will fail as their is a model change we need to do first.
https://eaflood.atlassian.net/browse/WATER-4156 Related to WATER-4155 and the work to replace the legacy bill page with our own we're now starting to build the page it will link to; a view of the bill licence and all its transactions. We are adding a [new fetch bill licence service](#501) that will return data for both SROC and PRESROC transactions. Unfortunately, the previous team chose to store data related to the transactions differently. This means depending on what scheme a transaction is linked to you need to pull information from different places. To support this we need to make a tweak to our `ChargeReferenceModel`. Under SROC a charge reference has multiple charge elements which in turn have multiple charge purposes. These purposes then link to a `PurposeModel`. Under PRESROC the charge reference is _actually_ a charge element (hence the table name is `charge_elements`) and directly links to a `PurposeModel`. So, this change updates the ChargeReferenceModel so that it _can_ pull through the linked purpose should one exist.
Need #502 merged before this can be merged. |
https://eaflood.atlassian.net/browse/WATER-4156 Related to WATER-4155 and the work to replace the legacy bill page with our own we're now starting to build the page it will link to; a view of the bill licence and all its transactions. We are adding a [new fetch bill licence service](#501) that will return data for both SROC and PRESROC transactions. Unfortunately, the previous team chose to store data related to the transactions differently. This means depending on what scheme a transaction is linked to you need to pull information from different places. To support this we need to make a tweak to our `ChargeReferenceModel`. Under SROC a charge reference has multiple charge elements which in turn have multiple charge purposes. These purposes then link to a `PurposeModel`. Under PRESROC the charge reference is _actually_ a charge element (hence the table name is `charge_elements`) and directly links to a `PurposeModel`. So, this change updates the ChargeReferenceModel so that it _can_ pull through the linked purpose should one exist. We also update the `PurposeModel` with the new relationship. Note, whilst doing this we spotted that the existing relationship to charge elements was wrong. It should be a `HasManyRelation` so we also use this opportunity to fix it.
SonarCloud is complaining about duplication I think (because it won't show where it thinks the duplication is!) with I'm fine with this as they are doing 2 separate things, and the duplication is with the query and not code (as such). We would overcomplicate things and/or impact performance by trying to write one query that would cover both scenarios just to make SonarCloud happy. Unfortunately, there isn't a way for me to tell SonarCloud to go away on this one 😁 |
https://eaflood.atlassian.net/browse/WATER-4156 Related to WATER-4155 and the work to replace the legacy bill page with our own we're now starting to build the page it will link to; a view of the bill licence and all its transactions. We've already made several other changes to support this. This change adds a new service that orchestrates fetching the information needed ([Add new fetch bill licence service](#501)), passing it through to a presenter ([Add View bill licence presenter](#508)) and returning the result.
https://eaflood.atlassian.net/browse/WATER-4156 Related to WATER-4155 and the work to replace the legacy bill page with our own we're now starting to build the page it will link to; a view of the bill licence and all its transactions. We've already made several other changes to support this. This change adds a new service that orchestrates fetching the information needed ([Add new fetch bill licence service](#501)), passing it through to a presenter ([Add View bill licence presenter](#508)) and returning the result.
https://eaflood.atlassian.net/browse/WATER-4156
Related to WATER-4155 and the work to replace the legacy bill page with our own we're now starting to build the page it will link to; a view of the bill licence and all its transactions.
This adds a service that will get the data needed for the page. Mainly that is the transaction detail but also information about the bill and licence needed for context on the page.
One thing to note is the service makes no distinction between SROC and PRESROC. However, some linked entities and fields are only used when a transaction is one or the other.