Add reason mapping query to return version import #1000
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-4636
Now that we are importing the NALD mod logs and linking them to their WRLS version records (charge, licence and returns) we can look to update the WRLS records with their missing reasons.
We've worked with the Billing & Data team to map NALD reasons to those in WRLS. There are a couple that don't map, and for those, water-abstraction-system will fall back to whatever reason description we have in the mod log. For the rest, though, we can fill in their missing
reason
field with the mapped WRLS reason. We can then start displaying this to users on our new UI screens.This change adds another query to the charging data import that will do the mapping for those WRLS return versions.
reason