-
Notifications
You must be signed in to change notification settings - Fork 132
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
Flexible mqtt topics #1850
Flexible mqtt topics #1850
Conversation
add35e2
to
4799710
Compare
c7caace
to
2a92a35
Compare
# send form update notification | ||
send_message( | ||
instance_id=self.object.id, target_id=self.object.id, | ||
target_type=XFORM, user=self.request.user, | ||
message_verb=FORM_UPDATED) |
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.
Is there a chance that the _try_update_xlsform
function might fail?
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.
Mainly concerned with sending the notification before confirming that the XForm has been updated...
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.
Makes sense. Made changes
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.
LGTM, have a few comments. Also this might be a bit nitpicky but there are two commits named Use Organisational name
could we squash those into one ?
# Sometimes the Action isn't created yet, hence | ||
# the need to delay 2 seconds | ||
call_backend_async.apply_async( | ||
(backend, instance.id, backend_options), countdown=2) |
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.
Why are the actions not created at this point sometimes? Expecting this function to only be called after the Action is saved... and instance
should be an Action
object right ?
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.
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.
Mhh weird... I'm guessing the created
boolean was also True
at this point?
86e513b
to
01b6167
Compare
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.
@lincmba this has passed QA. A message payload is included for each API json response. |
…each time there is an update to the form yet the notification is only interested in changes in the form xls file itself. For submissions, this isn't called when there is a bulk update of the submissions. Signed-off-by: lincmba <[email protected]>
For submissions: Send notification both upon creation and edit Signed-off-by: lincmba <[email protected]>
Send notification on bulk submission review Signed-off-by: lincmba <[email protected]>
`/onadata/organization/{org_id}/project/{proj_id}/xform/{xform_id}/#` Signed-off-by: lincmba <[email protected]>
Signed-off-by: lincmba <[email protected]>
Signed-off-by: lincmba <[email protected]>
1. Submission Review 2. Bulk Submission Review 3. CSV upload submission creation 4. CSV Upload submission edit 5. Form update 6. Submission Delete 7. Bulk Submission Delete Signed-off-by: lincmba <[email protected]>
Send message only after successful xls form update
01b6167
to
a9c4cf4
Compare
Changes / Features implemented
Supercedes #1793
Submissions: Send notification both upon creation and edit
/onadata/organization/{org_id}/project/{proj_id}/xform/{xform_id}/#
To test
/onadata/organization/[org_username]/project/[proj_id]/xform/[form_id]/submission/deleted
/api/v1/messaging.json?target_type=xform&target_id={form_id}&verb=submission_deleted
/onadata/organization/[org_username]/project/[proj_id]/xform/[form_id]/submission/created
/api/v1/messaging.json?target_type=xform&target_id={form_id}&verb=submission_created
/onadata/organization/[org_username]/project/[proj_id]/xform/[form_id]/submission/edited
/api/v1/messaging.json?target_type=xform&target_id={form_id}&verb=submission_edited
/onadata/organization/[org_username]/project/[proj_id]/xform/[form_id]/submission/reviewed
/api/v1/messaging.json?target_type=xform&target_id={form_id}&verb=submission_review
/onadata/organization/[org_username]/project/[proj_id]/xform/[form_id]/form/updated
/api/v1/messaging.json?target_type=xform&target_id={form_id}&verb=form_updated
Example payload:
Steps taken to verify this change does what is intended
Written tests
Side effects of implementing this change
Closes #1846