-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cleanup licence data removed from NALD #1047
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-4662 Following a requirements analysis meeting on the 21st November we need to make some updates to the queries we have written to remove licence data from WRLS that no longer exists in NALD. A PR that deals with the scenario where the licence record has been removed from NALD has already been completed in PR #1044 This PR will be focussing on the child records of the licence that may have been removed from NALD whilst the licence still remains. The exception to this would be a licence that has been removed from NALD but has not been removed from WRLS as it has been involved in a bill run, has a return version, or is linked to an external entity. The individual tickets covered by this PR are: - https://eaflood.atlassian.net/browse/WATER-4751
This query will delete any soft deleted licence monitoring stations linked to deleted NALD licence version purpose conditions
At this point in the process the only monitoring stations remaining are ones which should not be removed. As they can't be removed that means that the purpose will also not be removed. Because the purpose cannot be removed (even if it has been removed from NALD) it will need at least 1 point to be a valid record. Therefore the point is not deleted. This is because if there were 2 points on the purpose both could also have been deleted from NALD if the purpose was removed. This would make it pretty much impossible to determine which point may need to be kept if there are more than one. Therefore no point gets deleted. The same applies to the purpose if its associated licence cannot be deleted for reasons.
SonarCloud is complaining about the test coverage after I moved some of the queries out of the main handler function into their own private functions. As the queries were not previously tested, I'm not planning on adding new tests to this legacy code. |
Cruikshanks
approved these changes
Dec 9, 2024
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-4662
Following a requirements analysis meeting on November 21st, we need to update the queries we have written to remove licence data from WRLS that no longer exists in NALD.
A PR that deals with the scenario where the licence record has been removed from NALD has already been completed in PR #1044
This PR will focus on the child records of the licence that may have been removed from NALD while the licence remains. The exception to this would be a licence that has been removed from NALD but has not been removed from WRLS as it has been involved in a bill run, has a return version, or is linked to an external entity.
The individual tickets covered by this PR are: