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

Fix type defaults on the water notes table #2601

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Conversation

rvsiyad
Copy link
Contributor

@rvsiyad rvsiyad commented Aug 12, 2024

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

During the creation of the licence history page, we noticed we were missing the model and helper for the notes table. This is being referenced when extracting charge versions for a licence and any relating notes created. This is being worked on in the Create notes table model, helper, and view in the water-abstraction-system repo.

While working on the change we realised the notes table has fields that are unused:

  • licence_id - is never populated
  • type - is always set to 'charge-version'
  • type_id - is set to the charge version's id and is not needed to link the two together

We do not these fields included in the view for the notes table that we will add to water-abstraction-system. However, type and type_id are set as not-nullable. This change defaults type to 'charge-version' andtype_id will remove the constraint.

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

During the creation of the licence history page, we noticed we are missing the model and helper for the notes table.
This is being referenced when extracting charge versions for a licence and any relating notes created. This is being worked on
in the [Create notes table model, helper and view](DEFRA/water-abstraction-system#1240) in water-abstraction-system
repo.

While working on the change we realised the notes table has fields that are unused:

- `licence_id` - is never populated
- `type` - is always set to 'charge-version'
- `type_id` - is set to the charge version's id and is not needed to link the two together

We do not these fields included in the view for the notes table that we will add to [water-abstraction-system](https://github.com/DEFRA/water-abstraction-system).
However, `type` and `type_id` are set as not-nullable. This change defaults type to 'charge-version' and`type_id` will remove the constraint.
@rvsiyad rvsiyad added the housekeeping Refactoring, tidying up or other work which supports the project label Aug 12, 2024
@rvsiyad rvsiyad self-assigned this Aug 12, 2024
@rvsiyad rvsiyad requested a review from Cruikshanks August 12, 2024 15:23
@rvsiyad rvsiyad marked this pull request as ready for review August 12, 2024 15:23
@rvsiyad rvsiyad merged commit 82010d4 into main Aug 12, 2024
4 checks passed
@rvsiyad rvsiyad deleted the fix-default-on-notes-table branch August 12, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants