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

Import contact data for a licence #1317

Merged
merged 33 commits into from
Sep 24, 2024

Conversation

jonathangoulding
Copy link
Collaborator

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

We need to replace the import service logic to import a licence from NALD.

The current import service iterates all the companies (known as parties in the import.NALD_PARTIES table) and updates CRM_V2 tables.

This change will use the nald licence id and region to update the companies (parties) contact data. This means going forwards we will only import companies (parties) contact when the licence is imported.

We will insert this imported data in the relevant public views.

This change focuses on the companies (parties) contact data and not address or contacts tables which will be done after this work.

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

We need to replace the import service logic to import a licence from NALD.

The current import service iterates all the companies (known as parties in the import.NALD_PARTIES table) and updates CRM_V2 tables.

This change will use the nald licence id and region to update the companies (parties) contact data. This means going forwards we will only import companies (parties) contact when the licence is imported.

We will insert this imported data in the relevant public views.

This change focuses on the companies (parties) contact data and not address or contacts tables which will be done after this work.
@jonathangoulding jonathangoulding added the enhancement New feature or request label Sep 9, 2024
@jonathangoulding jonathangoulding self-assigned this Sep 9, 2024
@jonathangoulding jonathangoulding marked this pull request as ready for review September 10, 2024 10:36
@jonathangoulding jonathangoulding changed the title Import company contact data for a licence Import contact data for a licence Sep 12, 2024
@jonathangoulding jonathangoulding marked this pull request as draft September 13, 2024 10:27
@jonathangoulding jonathangoulding marked this pull request as ready for review September 13, 2024 12:26
@jonathangoulding jonathangoulding marked this pull request as draft September 19, 2024 15:49
@jonathangoulding jonathangoulding removed the request for review from Cruikshanks September 19, 2024 15:49
.insert({ ...contact, updatedAt })
.onConflict('externalId')
.merge([
'salutation',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should this update the data source to nald ? what if this has changed in wrls. Might be a none issue as the test helper sets this as wrls.

@jonathangoulding jonathangoulding marked this pull request as ready for review September 23, 2024 11:08
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

An incomplete first pass, but hopefully something to be considering whilst I get on and look through the rest!

app/presenters/import/legacy/company-contact.presenter.js Outdated Show resolved Hide resolved
app/services/import/legacy/fetch-contacts.service.js Outdated Show resolved Hide resolved
app/services/import/legacy/fetch-contacts.service.js Outdated Show resolved Hide resolved
app/services/import/legacy/transform-contacts.service.js Outdated Show resolved Hide resolved
app/services/import/legacy/transform-contacts.service.js Outdated Show resolved Hide resolved
app/services/import/legacy/transform-contacts.service.js Outdated Show resolved Hide resolved
app/services/import/legacy/transform-contacts.service.js Outdated Show resolved Hide resolved
@jonathangoulding jonathangoulding merged commit 902e34e into main Sep 24, 2024
5 of 6 checks passed
@jonathangoulding jonathangoulding deleted the import-company-contact-for-licence branch September 24, 2024 12:54
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