bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

Names Emails - UI function for Staff to resend emails when client calls and states email was not received #19369

Open ozamani9gh opened 10 months ago

ozamani9gh commented 10 months ago

Related to OPS Ticket: 3392

https://app.zenhub.com/workspaces/ops-60f8556e05d25b0011468870/issues/gh/bcgov-registries/ops-support/3392.

Add the ability to resend email for the following email processes:

APPROVED EMAIL EXPIRY EMAIL CONSENT EMAIL.

add any other types of emails that user is missing original email.

Wireframe Link: https://www.figma.com/file/zHZFygfAWSmNp6kDb7g1Zs/NameX-Vue-3-upgrade-UXA?type=design&node-id=2-25&mode=design

bolyachevets commented 10 months ago

Currently Approved/Consent emails are triggered when corresponding flags are included in the payload in the namex backend application: https://github.com/bcgov/namex/blob/f8cf4af6cb6a1e28c5beb8a849855b2a3bbc1c15/api/namex/resources/requests.py#L695 https://github.com/bcgov/namex/blob/f8cf4af6cb6a1e28c5beb8a849855b2a3bbc1c15/api/namex/resources/requests.py#L871C12-L871C12

You can actually resend APPROVED/Consent emails by hitting Re-open button for NR and then Approving it one more timeScreenshot 2024-01-17 at 5.26.41 PM.png

But the email will actually be delivered if the email is reachable which can be verified through the notify-api callback table :

bolyachevets commented 10 months ago

To trigger consent letter we need to reset consent letter flag - first remove 'received' status

Screenshot 2024-01-17 at 5.37.52 PM.png

then add it again:

Screenshot 2024-01-17 at 5.34.37 PM.png
bolyachevets commented 10 months ago

For expiry letters the mechanism is different, those emails are sent via nr day job: https://github.com/bcgov/namex/blob/main/jobs/nr-day-job/nr_day_job.py

eve-git commented 9 months ago

@bolyachevets do you know if there are services to provide the info of emails been sent for an NR? such as date, type...

bolyachevets commented 9 months ago

@bolyachevets do you know if there are services to provide the info of emails been sent for an NR? such as date, type...

you can check notify-api db, e.g. oc port-forward -n d893f6-prod svc/postgresql-notify-prod 6017:5432

SELECT * FROM public.notification_history --- will show you what emails were sent

Screenshot 2024-02-06 at 4 19 50 PM

SELECT * FROM public.gc_notify_callback --- will show you email status

Screenshot 2024-02-06 at 4 20 11 PM
eve-git commented 9 months ago

@bolyachevets thanks! do you know where the notify-api code is?

bolyachevets commented 9 months ago

@bolyachevets thanks! do you know where the notify-api code is?

https://github.com/bcgov/bcregistry-sre/tree/main/notify-api

janisrogers commented 9 months ago

I believe this is needed by other teams, not just names. We should look staff having the ability to see what was sent for a business (or an NR in this case), who it was sent to and when, and the ability to resend if needed to the same email or a different email.

ozamani9gh commented 9 months ago
image.png
ozamani9gh commented 9 months ago

@LizGovier is there an ETA of when the design work will be ready for this. We are eager to start. we need to implement a UI for staff to be able to resend the emails in Name Examination.

LizGovier commented 9 months ago

Hey @ozamani9gh @ethantspitt should be able to get started on this task early next week.

ethantspitt commented 8 months ago

Figma link updated, questions for confirmation:

Is it common for a client to request a resend of an email regarding previous status information? For instance, if a Name Request has expired, would there be a need for functionality to resend a consent email?

If the above scenario is common, we could use a selection menu that staff can choose which email to re-issue. Please review the table in the design link for available menu options.

ethantspitt commented 8 months ago

Design option updated for viewing historical notification detail such as content, client email address, and sent date.

ozamani9gh commented 8 months ago

@ethantspitt this ticket is ready to work on now?

ethantspitt commented 8 months ago

@ozamani9gh yes, the design is updated based on feedback yesterday. I added some notes for developer, please let me know if you have any questions, thanks.

ethantspitt commented 8 months ago

Design reviewed, ready for development

ozamani9gh commented 8 months ago

@PCC199 @oanyahuru i asked Ethan to also add a design for a button that allows us to resend an email that does not have a record in notify-api DB. in case something wasnt recorded, or we dont have a record of sending the original email in DB.

one he updates design, i will create a separate ticket for that work. and add it to this epic.