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 FetchDownloadRecipientsService #1678

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jonathangoulding
Copy link
Collaborator

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

As part of the work to implement notifications in the system repo we have a requirement to download the recipients data as a CSV.

This change adds the required data for the CSV. This recipient list does not require deduplication as per previous work. And we can expect multiple rows per licence.

However, we will still a registered licence contact over an unregistered licence.

The controller / presenter / service will be added in a later change.

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

As part of the work to implement notifications in the system repo we have a requirement to download the recipients data as a CSV.

This change adds the required data for the CSV. This recipient list does not require deduplication as per previous work. And we can expect multiple rows per licence.

However, we will still a registered licence contact over an unregistered licence.

 The controller / presenter / service will be added in a later change.
@jonathangoulding jonathangoulding added the enhancement New feature or request label Feb 3, 2025
@jonathangoulding jonathangoulding self-assigned this Feb 3, 2025
@jonathangoulding jonathangoulding marked this pull request as ready for review February 3, 2025 16:34
* If a licence is registered, we only extract the email contacts. Unregistered licences its the 'Licence holder' and
* 'Returns to' contacts from `licence_document_headers.metadata->contacts`.
*
* We have another service 'FetchContactsService' which removes duplicates rows by squashing them together.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Info for the reviewer - This js doc is similar to 'FetchContactsService' with this change added.

SELECT
contacts.licence_ref,
contacts.contact_type,
contacts.return_reference,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have mapped the return log data direct. I did not feel it necessary to prefix them with return_log but i can see an argument for return_log_start_date over just start_date.

happy to change or leave as is.

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.

1 participant