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 a new licence version purpose points table #2626

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

Cruikshanks
Copy link
Member

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

Part of the work to migrate return versions from NALD to WRLS

We've been extending and amending the import of return versions from NALD to WRLS as part of our work to switch from NALD to WRLS to manage them. To support this we Created a return-requirement-points table and updated the import to import them.

Users select these points as part of the return requirements setup journey we've built. We extract them from the JSON blob stored in the permit.licence table. The problem we've encountered is the import service only populates the points for licences that.

  • Have not ended
  • Have a current licence version

Otherwise, permit.licence is not populated with the points data our journey relies on, causing it to throw an error. Places like the view licence page are also affected by this.

For example, it is perfectly valid that we have an 'ended' licence that we need to correct the historic return versions. And no matter the state, we can see what points the licence was linked to.

We don't know why the previous team never opted to extract licence points to their own table. But this change adds a new migration to create the table.

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

> Part of the work to migrate return versions from NALD to WRLS

We've been extending and amending the import of return versions from NALD to WRLS as part of our work to switch from NALD to WRLS to manage them. To support this we [Created a return-requirement-points table](#2540) and [updated the import](DEFRA/water-abstraction-import#933) to import them.

Users select these points as part of the return requirements setup journey we've built. We extract them from the JSON blob stored in the `permit.licence` table. The problem we've encountered is the import service only populates the points for licences that.

- Have not ended
- Have a current licence version

Otherwise, `permit.licence` is not populated with the points data our journey relies on, causing it to throw an error. Places like the view licence page are also affected by this.

For example, it is perfectly valid that we have an 'ended' licence that we need to correct the historic return versions. And no matter the state, we can see what points the licence was linked to.

We don't know why the previous team never opted to extract licence points to their own table. But this change adds a new migration to create the table.
@Cruikshanks Cruikshanks added the enhancement New feature or request label Aug 27, 2024
@Cruikshanks Cruikshanks self-assigned this Aug 27, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review August 27, 2024 17:15
@Cruikshanks Cruikshanks merged commit e9b6606 into main Aug 27, 2024
4 checks passed
@Cruikshanks Cruikshanks deleted the add-new-licence-version-purpose-points-table branch August 27, 2024 17:15
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