Closed franck-boullier closed 6 years ago
I have no idea how to tell what's changed for my events I am testing with or how to review this.
Oh I see the files now. They don't appear to be valid JSON.
They don't appear to be valid JSON.
Any suggestion/pointer on what might be wrong?
tl;dr remove the comments otherwise i can't merge. I could do this for you.
Comments like these are not permitted in JSON:
# The formats are
# notification_type -> varchar(255)
# bz_source_table -> varchar(240)
# notification_id -> varchar(255)
# created_datetime -> datetime
# unit_id -> smallint(6)
# case_id -> mediumint(9)
# case_title -> varchar(255)
# reporter_user_id -> mediumint(9)
Furthermore since your procedure SQL doesn't seem to treat integer types correctly, i.e. you quote them, currently at the /api/db-change-message/process
API that ingests these payloads, I am assuming every field is a string at first. Then I am looking at the example to work out if I need to parseInt.
remove the comments otherwise i can't merge
@kaihendry: done
"current_list_of_invitees": "13, 15, 23"
should be "current_list_of_invitees": [13, 15, 23]
but I understand it can be hard to stringify JSON correctly from SQL. So my code will be making some assumptions of the string payloads.
I only just noticed assignee_user_id has been renamed? This is breaking the code. WHY???
case_assignee_updated.json: "assignee_user_id": "19",
case_assignee_updated.json: "old_case_assignee_user_id": "12",
case_assignee_updated.json: "new_case_assignee_user_id": "19",
case_new.json: "old_case_assignee_user_id": "12",
case_new.json: "new_case_assignee_user_id": "12",
case_new_message.json: "old_case_assignee_user_id": "12",
case_new_message.json: "new_case_assignee_user_id": "21",
case_updated.json: "old_case_assignee_user_id": "12",
case_updated.json: "new_case_assignee_user_id": "12",
case_user_invited.json: "old_case_assignee_user_id": "12",
case_user_invited.json: "new_case_assignee_user_id": "20",
I only just noticed assignee_user_id has been renamed (...) WHY???
@kaihendry this is to avoid confusion when the assignee is changed (who is the assigned person?). Having both values:
allows us to knowingly choose who we want to send the notification to
@kaihendry merge if this is OK for you