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

Add reason mapping query to return version import #1000

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Aug 19, 2024

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

Part of the work to display a licence's history to users (mod log)

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.

  • that have an empty reason
  • that have mod log records
  • the first mod log record has a reason code
  • the reason code is mapped to WRLS

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

> Part of the work to display a licence's history to users (mod log)

Now that we are [importing the NALD mod logs](#998) 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 done some work 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](https://github.com/DEFRA/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 in the out new UI screens.

This change adds another query to the charging data import, that will do the mapping for those WRLS return versions that

- have an empty `reason``
- have mod log records
- the first mod log record has a reason code
- the reason code is mapped to WRLS
@Cruikshanks Cruikshanks added the enhancement New feature or request label Aug 19, 2024
@Cruikshanks Cruikshanks self-assigned this Aug 19, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review August 20, 2024 09:33
@Cruikshanks Cruikshanks merged commit a62dc6e into main Aug 20, 2024
4 checks passed
@Cruikshanks Cruikshanks deleted the add-return-version-mod-log-reason-mapping branch August 20, 2024 09:33
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.

1 participant