equinor / lighthouse-client

WebClient for project Lighthouse
https://jc.fusion.equinor.com/
MIT License
6 stars 0 forks source link

Aker email accounts not being sent notifications for tasks #1597

Closed EDUT-Equinor closed 8 months ago

Gustav-Eikaas commented 8 months ago

dev context:

A PCS person has an email property which is the preferred email and not necessarily the EQ mail. The fusion Notifications api specifies personIdentifier but after digging into the code its either email or azure oid.

By resolving this email property from PCS we can send an email to the preferred email instead of the EQ mail.

Gustav-Eikaas commented 8 months ago

This needs a rework, short summary.

The fusion notifications api is capable of sending emails out of Equinor. But the email must be registered on their account in fusion. Today this is only possible in the contract personnel application. This is not feasible for Castberg fix.

Implementation flow

  1. If user is Equinor and have EQ preferred mail in pcs. No problem✅ User gets email and notification
  2. User is Equinor and preferred email is aker in pcs and user has 365 acc in equinor. User gets email for both EQ and aker. And fusion notification. ✅
  3. User is Equinor and preferred email is aker in pcs but user does not have 365 acc in EQ. User gets email in ext email and notification in fusion. ✅

Hardest part of implementaion is testing as it requires whitelisting and database tampering.

Gustav-Eikaas commented 8 months ago

The Fusion mail endpoint doesnt support adaptive cards. I made some custom html that im sending to the server

image