-
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
Licences in Workflow should not be considered #176
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/browse/WATER-3949 Prevent licences that appear in the workflow from being included in the bill run.
Cruikshanks
previously approved these changes
Mar 27, 2023
Cruikshanks
approved these changes
Mar 27, 2023
StuAA78
approved these changes
Mar 27, 2023
Cruikshanks
added a commit
that referenced
this pull request
May 5, 2023
https://eaflood.atlassian.net/browse/WATER-3999 In [Licences in Workflow should not be considered](#176) we made a change to our `FetchChargeVersionsService` to exclude any charge version that was in the `charge_version_workflows` table. It was identified as a requirement that anything in 'workflow' should not be considered for billing. When we tested we saw that when adding a charge version, for example, a `charge_version_workflow` record is created. Once the charge version gets approved the workflow record gets deleted. This is the same behaviour we have noted elsewhere. But, during UAT it was noted there were licences (charge versions) not being picked up for supplementary billing which when checking the workflow screen were not displayed. Some digging found the reason. Workflow records have a 'status'; `to_setup` or `review` (there is also `changes_requested` but we've not seen evidence of its use). We don't understand _how_ the `to_set_up` records get added (probably during the import process). But `review` appears when you add a new charge version. After some testing we've found that if you click the 'Set up' link on the entry in a licence's charge versions, it changes the workflow's status from `to_setup` to `review`. When you charge version gets approved the workflow record gets deleted. But, and this is where our work has come undone! If you click the 'Remove' link all the service does is update the workflow's `date_deleted` column. It doesn't delete the record 😮😩 We don't know why they are handled differently. But we need to account for these 'soft-deleted' workflow records in `FetchChargeVersionsService`.
Cruikshanks
added a commit
that referenced
this pull request
May 5, 2023
https://eaflood.atlassian.net/browse/WATER-3999 In [Licences in Workflow should not be considered](#176) we changed our `FetchChargeVersionsService` to exclude any charge version that was in the `charge_version_workflows` table. It was identified as a requirement that anything in 'workflow' should not be considered for billing. When we tested we saw that when adding a charge version, for example, a `charge_version_workflow` record is created. Once the charge version gets approved the workflow record gets deleted. This is the same behaviour we have noted elsewhere. But, during UAT it was noted there were licences (charge versions) not being picked up for supplementary billing which when checking the workflow screen were not displayed. Some digging found the reason. Workflow records have a 'status'; `to_setup` or `review` (there is also `changes_requested` but we've not seen evidence of its use). We don't understand _how_ the `to_set_up` records get added (probably during the import process). But `review` appears when you add a new charge version. After some testing, we've found that if you click the 'Set up' link on the entry in a licence's charge versions, it changes the workflow's status from `to_setup` to `review`. When your charge version gets approved the workflow record gets deleted. But, this is where our work has come undone! If you click the 'Remove' link all the service does is update the workflow's `date_deleted` column. It doesn't delete the record 😮😩 We don't know why they are handled differently. But we must account for these 'soft-deleted' workflow records in `FetchChargeVersionsService`.
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/browse/WATER-3949
Prevent licences that appear in the
charge_versions_workflow
table from being included in the bill run.If a licence is in the workflow for any reason it is a business requirement that it is not included in supplementary billing.
This change insures that any charge versions linked to a licence that is in workflow are not included in a supplementary bill run.