[BACK-3013] Log work system email notifications event history. #918
[BACK-3013] Log work system email notifications event history. #918lostlevels wants to merge 15 commits intomasterfrom
Conversation
…sers on specific events.
…itionalnotifications => notifications.
f7365e4 to
0c2418e
Compare
|
Did you run |
darinkrauss
left a comment
There was a problem hiding this comment.
First pass with a number of questions/comments.
|
BTW, it looks like the build failed because you need to run |
darinkrauss
left a comment
There was a problem hiding this comment.
A number of comments and a question or two. Does need some changes, mostly handling the error from Recorder.Create.
darinkrauss
left a comment
There was a problem hiding this comment.
I'll approve, but if the List API has the potential to return many documents (thousands+), then this PR needs changes to support a pagination parameter and a stable sort on the Mongo query.
Addressed. |
Used for general history tracking and to filter existing errors/requests for users for the initial error send.
a59a081 to
dce91e4
Compare
|
Force pushed to squash last 7 commits to make merging in master easier. |
|
@darinkrauss Latest commit always adds metadata to notification events history and forgot to add notification history event for device issues. |
|
Last commit uses the work item's metadata since that's serialized already w/ correct capitalization. |
darinkrauss
left a comment
There was a problem hiding this comment.
LGTM! One comment about serializing the error.
| Email string `bson:"email,omitempty"` | ||
| GroupID string `bson:"groupId,omitempty"` | ||
| Metadata bson.M `bson:"metadata,omitempty"` | ||
| Error error `bson:"error,omitempty"` |
There was a problem hiding this comment.
If you capture the error within an errors.Serializable it will capture the full internal error context and information. So:
Error errors.Serializable `bson:"error,omitempty"`
Adds a log of email notification related events. Used by related script to send, and avoid re-sending, to existing users w/ device issues / expired connection requests.