-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tag where permit is used #2618
base: main
Are you sure you want to change the base?
Tag where permit is used #2618
Conversation
@@ -71,7 +73,7 @@ const handler = async () => { | |||
// For the successful records, | |||
// mark them as processed by updating the datestamp | |||
// in permit.licence.date_licence_version_purpose_conditions_last_copied | |||
|
|||
// TODO: permit used here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This work has been tagged to show it is used as part of the Digitize journey (Also known as AR and abstraction reform)
@@ -128,6 +130,7 @@ const handler = async () => { | |||
// For the successful records, | |||
// mark them as processed by updating the datestamp | |||
// in permit.licence.date_licence_version_purpose_conditions_last_copied | |||
// TODO: permit used here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This data is pulled from CSV in aws.
We have added seeders to what we have called reference data. This can be reference data.
A discussion need to had if we can store this data in git or needs to handle more securely.
@@ -66,7 +66,7 @@ const getLicence = async (document, includeExpired, companyId) => { | |||
} | |||
|
|||
throwIfUnauthorised(documentHeader, companyId) | |||
|
|||
// TODO: permit used here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can not establish where this is called (if it even is).
It is not in the Licence Summary pages as they use the licence module.
As we have migrated all the licence summary pages (tabs), if this call was used on the summary page it will no longer be needed when we remove the summary code, however nothing leads to believe they call this controller.
@@ -263,6 +263,7 @@ const mapXml = async (xmlStr, user, today) => { | |||
// Stage 1 - get licence numbers and region codes | |||
const permits = getPermitsFromXml(xmlDoc) | |||
const licenceNumbers = getLicenceNumbersFromPermits(permits) | |||
// TODO: permit used here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get this direct using the water.licences
As discussed. If the XML mapper is used (which we currently believe no customers are) then this code could be removed or updated.
This data can be retrieved from water.licences
@@ -139,6 +140,7 @@ const getVersions = async () => { | |||
waterService: pkg.version, | |||
idm: await idmConnector.getServiceVersion(), | |||
crm: await crmServiceVersionConnector.getServiceVersion(), | |||
// TODO: permit used here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
potential dead - mark as dead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The system repo has it's own implementation for checkign service statues.
This is now obsolete.
@@ -21,7 +21,7 @@ const postPreviewReturnNotification = async (request, h) => { | |||
|
|||
// Create a new set to remove any duplicate values | |||
const licenceRefs = [...new Set(data.map(item => item.licence_ref))] | |||
|
|||
// TODO: permit used here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is located in the Returns notification paper forms functionality.
I have created a paper for notification but i can not see this being called.
I could not trigger postPreviewReturnNotification
or postReturnNotification
using the UI.
This call can be replaced by extracting the REV_DATE
, EXPIRY_DATE
and LAPSED_DATE
from water.licence
dateRevoked: calendarToIso(row.licence_data_value.REV_DATE),
dateExpired: calendarToIso(row.licence_data_value.EXPIRY_DATE),
dateLapsed: calendarToIso(row.licence_data_value.LAPSED_DATE)
https://eaflood.atlassian.net/browse/WATER-4626
We want to establish what features in the legacy code depend on the permit.licence table. For example, we know in our own code, we depend on it to identify the ‘points’ for a licence.
The NALD import creates the permit licence table and document header table during the NALD import job.
The issue is that the permit.licence record is just a massive JSONB dump of all the NALD data related to the licence. It looks like the later licence import in water-abstraction-import did a much better job of breaking the same data down into constituent tables.
We’re focusing our efforts on recreating a new licence import ready for ReSP. But until we can confirm what legacy features depend on the old permit.licence table, we can’t decide whether to drop creating permit.licence records or recreate the massive JSONB dump.