-
Notifications
You must be signed in to change notification settings - Fork 0
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 LicenceEntityModel #690
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://eaflood.atlassian.net/browse/WATER-4324 > This is part of a series of changes to allow us to replace the legacy view licence page When viewing a licence using the [legacy water-abstraction-ui](https://github.com/DEFRA/water-abstraction-ui) the page will display information on who the registered user is. The registered is an external user who has declared that they manage the licence via the external UI. They are not the licence holder, just the person declared to be responsible for managing it. Unfortunately, this functionality dates from the very start of the service and the data is in one of the oldest legacy schemas; `crm`. It seems this was one of the things which the previous team never managed to migrate to `crm_v2`, their intended better CRM structure. We are expected to show this information in the licence view so we need to create some new models. The first of these is `LicenceEntityModel`, which is based on `crm.entity` and just holds a name and type.
Cruikshanks
added a commit
that referenced
this pull request
Jan 27, 2024
> This is part of a series of changes to allow us to replace the legacy view licence page When viewing a licence using the [legacy water-abstraction-ui](https://github.com/DEFRA/water-abstraction-ui) the page will display information on who the registered user is. The registered is an external user who has declared that they manage the licence via the external UI. They are not the licence holder, just the person declared to be responsible for managing it. Unfortunately, this functionality dates from the very start of the service and the data is in one of the oldest legacy schemas; `crm`. It seems this was one of the things which the previous team never managed to migrate to `crm_v2`, their intended better CRM structure. We are expected to show this information in the licence view so we need to create some new models. The first of these was [LicenceEntityModel](#690), which is based on `crm.entity` and just holds a name and type. The second is `LicenceEntityRoleModel`, which is based on `crm.entity_roles`. It appears to just be a joining table between `crm.entity` and `crm.roles`. But we need it because it identifies which `crm.entity` has the role of 'primary_user'.
Cruikshanks
added a commit
that referenced
this pull request
Jan 27, 2024
In creating `LicenceEntityRole` we spotted that the ID is not automatically generated. When we checked back on `LegacyEntity` we found the same. So, this change corrects what we've just done in [Add LicenceEntityModel](#690).
Cruikshanks
added a commit
that referenced
this pull request
Jan 27, 2024
In creating `LicenceEntityRole` we spotted that the ID is not automatically generated. When we checked back on `LegacyEntity` we found the same. We also spotted that though we can see UUID's have been used for both tables ID columns the type is just 'string'. So, this change corrects what we've just done in [Add LicenceEntityModel](#690).
Cruikshanks
added a commit
that referenced
this pull request
Jan 27, 2024
https://eaflood.atlassian.net/browse/WATER-4324 > This is part of a series of changes to allow us to replace the legacy view licence page When viewing a licence using the [legacy water-abstraction-ui](https://github.com/DEFRA/water-abstraction-ui) the page will display information on who the registered user is. The registered is an external user who has declared that they manage the licence via the external UI. They are not the licence holder, just the person declared to be responsible for managing it. Unfortunately, this functionality dates from the very start of the service and the data is in one of the oldest legacy schemas; `crm`. It seems this was one of the things which the previous team never managed to migrate to `crm_v2`, their intended better CRM structure. We are expected to show this information in the licence view so we need to create some new models. The first of these was [LicenceEntityModel](#690), which is based on `crm.entity` and just holds a name and type. The second is `LicenceEntityRoleModel`, which is based on `crm.entity_roles`. It appears to just be a joining table between `crm.entity` and `crm.roles`. But we need it because it identifies which `crm.entity` has the role of 'primary_user'.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-4324
When viewing a licence using the legacy water-abstraction-ui the page will display information on who the registered user is.
The registered is an external user who has declared that they manage the licence via the external UI. They are not the licence holder, just the person declared to be responsible for managing it.
Unfortunately, this functionality dates from the very start of the service and the data is in one of the oldest legacy schemas;
crm
. It seems this was one of the things which the previous team never managed to migrate tocrm_v2
, their intended better CRM structure.We are expected to show this information in the licence view so we need to create some new models. The first of these is
LicenceEntityModel
, which is based oncrm.entity
and just holds a name and type.