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 abstraction method to lic. purpose points #2642

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Oct 2, 2024

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

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

We recently Added new points and sources tables & amend existing to the service. This not only supports our work on return versions, it means we can move away from abstracting point information from the licence JSON blob in permit.licence.

We're also looking to migrate the pages linked to from the view licence summary, which are currently in the legacy water-abstraction-ui. One of them is information on points. We thought we'd captured everything 'point' related in the change but have since spotted 'Means of abstraction'.

This is linked to an abstraction purpose point in NALD and gives how water will be abstracted there, for example, "Surface Mounted Pump (Fixed)". We must capture this information as we import a licence's point information from NALD. So, the first step is to update the water.licence_version_purpose_points table to add a new method field that will allow us to store this information.

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

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

We recently [Added new points and sources tables & amend existing](#2638) to the service. Not only does it support our work on return versions, it means we can move away from abstracting point information from the licence JSON blob in `permit.licence`.

We're looking to also migrate the pages linked to from the view licence summary, which are currently in the legacy [water-abstraction-ui](https://github.com/DEFRA/water-abstraction-ui). One of them is information on points. We thought we'd captured everything 'point' related in the change but have since spotted 'Means of abstraction'.

This is linked to a point in NALD and gives how water will be abstracted there, for example, "Surface Mounted Pump (Fixed)". We need to capture this information as we import the point information from NALD. So, the first step is to add the table and update `water.points` so that it can be linked to a method.

> We have to name our table and entities in code and the DB. `means` doesn't really mean anything, and `means_of_abstraction` causes problems because it is not plural. Hence `methods`!
@Cruikshanks Cruikshanks added the enhancement New feature or request label Oct 2, 2024
@Cruikshanks Cruikshanks self-assigned this Oct 2, 2024
@Cruikshanks Cruikshanks changed the title Add new methods (of abstraction) table for points Add means of abstraction to points table Oct 2, 2024
Cruikshanks added a commit to DEFRA/water-abstraction-import that referenced this pull request Oct 2, 2024
https://eaflood.atlassian.net/browse/WATER-4645

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

In [Implement new 'points' job](#1028) we amended the import service to include a new 'points' job. Having realised that the way were intending to store point information was insufficient, we made enough changes to our points schema to warrant its own job to manage importing the NALD data.

We thought we'd captured everything 'point' related in the change but have since spotted 'Means of abstraction'. This is linked to a point in NALD and gives how water will be abstracted, for example, "Surface Mounted Pump (Fixed)". We are required to display this in the UI. Having [added the new column](DEFRA/water-abstraction-service#2642), this ensures it gets populated.
@Cruikshanks Cruikshanks changed the title Add means of abstraction to points table Add abstraction method to lic. purpose points Oct 2, 2024
Realised that the method of abstraction is not linked directly to a point. Instead, it is set against the licence's abstraction purpose point record.
@Cruikshanks Cruikshanks marked this pull request as ready for review October 2, 2024 16:46
@Cruikshanks Cruikshanks requested a review from rvsiyad October 2, 2024 16:49
Copy link
Contributor

@rvsiyad rvsiyad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cruikshanks Cruikshanks merged commit b2a9d08 into main Oct 7, 2024
4 checks passed
@Cruikshanks Cruikshanks deleted the add-new-methods-table branch October 7, 2024 09:05
Cruikshanks added a commit to DEFRA/water-abstraction-import that referenced this pull request Oct 7, 2024
https://eaflood.atlassian.net/browse/WATER-4645

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

In [Implement new 'points' job](#1028) we amended the import service to include a new 'points' job. Having realised that the way we intended to store point information was insufficient, we made enough changes to our points schema to warrant its own job to manage importing the NALD data.

We thought we'd captured everything 'point' related in the change but have since spotted 'Means of abstraction'. This is linked to an abstraction purpose in NALD and gives how water will be abstracted, for example, "Surface Mounted Pump (Fixed)". We are required to display this in the UI. Having [added the new column](DEFRA/water-abstraction-service#2642), this ensures it gets populated.
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.

2 participants