scientist-softserv/palni_palci_knapsack

BatchNotification Bug

Closed this issue · 2 comments

Summary

Rob identified a bug within the BatchEmailNotication work we did, because we put the last_emailed_at property on the User table.

His suggestion is to create and write to a join table instead.

notes for steps to resolve it:

new migration to remove last_emailed_at from user table
rails g model UserBatchEmail referencs:user last_emailed_at:datetime
User#last_emailed_at
  self.user_batch_email.find_or_create.last_emailed_at
User#last_emailed_at=(value)
  self.user_batch_email.find_or_create.update(last_emailed_at:  value)

related:

Acceptance Criteria

  • The code has been updated to utilize a join table instead of the User table, to query/update last_emailed_at.

QA RESULTS: ⚠️ PENDING

This appears to be working. Tested with THIS TENANT,

The email matches the details of the dashboard.

However, I am clicking around a bunch in another tenant. (demo tenant) It'll take about a day for the events to get tracked with GA4. Those stats and email should be different. right now it's kind of odd that the stats are the same.

DEMO profile

Image

EMAIL

Image

ADMIN DASHBOARD

Image