-
Notifications
You must be signed in to change notification settings - Fork 29
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 method to set modified_by on contacts #262
Conversation
Codecov Report
@@ Coverage Diff @@
## master #262 +/- ##
==========================================
+ Coverage 49.34% 49.39% +0.04%
==========================================
Files 86 86
Lines 7885 7896 +11
==========================================
+ Hits 3891 3900 +9
- Misses 3382 3383 +1
- Partials 612 613 +1
Continue to review full report at Codecov.
|
a02ce35
to
e9725e9
Compare
web/contact/contact.go
Outdated
// apply modified_by | ||
err = models.UpdateContactModifiedBy(ctx, tx, modifiedContactIDs, request.UserID) | ||
if err != nil { | ||
return nil, http.StatusInternalServerError, errors.Wrapf(err, "error applying modified_by") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should be after the pre commit hooks below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small tweak but otherwise looks good.
So I think this makes sense to do but I wonder whether we should reconsider how we log these types of things. Wonder whether the right solution here would rather be to create an audit trail for these events that are presented in the contact history the same as flow events are. That would give you a lot more visibility into what is happening and in truth the logging could be very similar since these modifiers also generate events. But do think this is fine for the time being. @rowanseymour |
Hmm yeah could have a user field on events when they were initiated from the UI. Similar https://github.com/rapidpro/rapidpro/issues/1016 Also fine with this for now |
I think it might be useful to have both a user and a flow so the UI could show for each modification what made it a user or a flow or import too Not sure if we want to have distinction such changed by import or via API by a user |
Switch to official Elastic v8 client library
No description provided.