Skip to content

Commit

Permalink
reply snow ticket: add user email to request payload
Browse files Browse the repository at this point in the history
  • Loading branch information
MJedr committed Oct 19, 2023
1 parent b31ff62 commit 74f741e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion inspirehep/modules/workflows/tasks/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ def reply_snow_ticket(obj, ticket_id, context_factory, user, template=None):
),
headers=_get_headers_for_hep_root_table_request(),
data=json.dumps(
{"ticket_id": str(ticket_id), "reply_message": reply_message}
{
"ticket_id": str(ticket_id),
"reply_message": reply_message,
"user_email": user.email
}
),
)
response.raise_for_status()
Expand All @@ -178,6 +182,7 @@ def reply_snow_ticket(obj, ticket_id, context_factory, user, template=None):
"ticket_id": str(ticket_id),
"template": template,
"template_context": template_context,
"user_email": user.email
}
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_reply_ticket_calls_tickets_reply_when_template_is_not_set(workflow_app)
assert expected_result == result
assert (
request_mocker.request_history[0]._request.body
== '{"ticket_id": "1", "reply_message": "reply reason"}'
== '{"ticket_id": "1", "reply_message": "reply reason", "user_email": "[email protected]"}'
)


Expand Down

0 comments on commit 74f741e

Please sign in to comment.