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

Refactor existing service to create a new one #529

Merged
merged 10 commits into from
Nov 20, 2023

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Nov 16, 2023

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

As part of the work we have been doing on two-part-tariff. We have found some code that we created for supplementary billing can be re-used for 2PT.

This PR will move the code that is responsible for determining the abstraction period from the CalculateAuthorisedAndBillableDaysService, and move it to a new service DetermineAbstractionPeriodService.

Once extracted out this function can then also be used by the 2PT process as well as supplementary.

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

As part of the work we have been doing on two-part-tariff. We have found some code that we created for supplementary billing can be re-used for 2PT.

This PR will move the code from the `CalculateAuthorisedAndBillableDaysService` that is responsible for determining the abstraction period, and move it to a new service `DetermineAbstractionPeriodService`.

Once extracted out this function can then also be used by the 2PT process as well as supplementary.
@Jozzey Jozzey added the enhancement New feature or request label Nov 16, 2023
@Jozzey Jozzey self-assigned this Nov 16, 2023
@Jozzey
Copy link
Contributor Author

Jozzey commented Nov 17, 2023

SonarCloud failing due to duplicated lines. This is due to the refactoring we are currently doing on 2PT and will not be an issue once complete.

@Jozzey Jozzey marked this pull request as ready for review November 17, 2023 17:09
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.

Just a second opinion on the comments and a typo. Great stuff!

Jozzey and others added 4 commits November 20, 2023 09:55
@Jozzey Jozzey requested a review from Cruikshanks November 20, 2023 10:05
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.

@Jozzey Jozzey merged commit ca5c81c into main Nov 20, 2023
4 of 5 checks passed
@Jozzey Jozzey deleted the create-determine-abs-period-service branch November 20, 2023 10:43
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