Fix issues with reissue post The Great Rename #664
Merged
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/browse/WATER-4336
Whilst working on updating our acceptance tests due to changes in the view bill run and view bill screens we found even after accounting for the changes, the SROC reissue test still failed.
After investigation, we were able to identify changes made during the The Great Rename had broken the reissue engine.
Before the rename the reissue engine depended on shared fields between records. For example, a
water.billing_invoice
and acrm_v2.invoice_account
shared the same fields;invoice_account_id
andinvoice_account_number
.So, you could pass an instance of both to a service like
GenerateBillService
and as far as it is concerned it is dealing with a 'billing account' instance because it has theinvoice_account_id
andinvoice_account_number
properties it expects.Post the rename this is no longer the case. Now we have the following
It's
invoiceAccountId
on the billing invoice and justid
on the invoice account.GenerateBillService
can no longer be given both types of instances and expect to get the same result.So, this fixes the issue by generating objects that represent what
GenerateBillService
andGenerateBillLicenceService
expect.