mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 11:38:24 -04:00
Put environment URL in feedback tickets
So that: - we know what environment a request has been sent from
This commit is contained in:
@@ -16,10 +16,12 @@ def feedback():
|
|||||||
'person_email': current_app.config.get('DESKPRO_PERSON_EMAIL'),
|
'person_email': current_app.config.get('DESKPRO_PERSON_EMAIL'),
|
||||||
'department_id': current_app.config.get('DESKPRO_TEAM_ID'),
|
'department_id': current_app.config.get('DESKPRO_TEAM_ID'),
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'message': '{}\n{}\n{}'.format(
|
'message': 'Environment: {}\n\n{}\n{}\n{}'.format(
|
||||||
|
url_for('main.index', _external=True),
|
||||||
form.name.data,
|
form.name.data,
|
||||||
form.email_address.data,
|
form.email_address.data,
|
||||||
form.feedback.data)
|
form.feedback.data
|
||||||
|
)
|
||||||
}
|
}
|
||||||
headers = {
|
headers = {
|
||||||
"X-DeskPRO-API-Key": current_app.config.get('DESKPRO_API_KEY'),
|
"X-DeskPRO-API-Key": current_app.config.get('DESKPRO_API_KEY'),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ def test_post_feedback_with_no_name_email(app_, mocker):
|
|||||||
data={
|
data={
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'message': '\n\nblah',
|
'message': 'Environment: http://localhost/\n\n\n\nblah',
|
||||||
'person_email': ANY},
|
'person_email': ANY},
|
||||||
headers=ANY)
|
headers=ANY)
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ def test_post_feedback_with_name_email(app_, mocker):
|
|||||||
data={
|
data={
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
'message': 'Steve Irwin\nrip@gmail.com\nblah',
|
'message': 'Environment: http://localhost/\n\nSteve Irwin\nrip@gmail.com\nblah',
|
||||||
'person_email': ANY},
|
'person_email': ANY},
|
||||||
headers=ANY)
|
headers=ANY)
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ def test_log_error_on_post(app_, mocker):
|
|||||||
data={
|
data={
|
||||||
'subject': 'Notify feedback',
|
'subject': 'Notify feedback',
|
||||||
'department_id': ANY,
|
'department_id': ANY,
|
||||||
'message': 'Steve Irwin\nrip@gmail.com\nblah',
|
'message': 'Environment: http://localhost/\n\nSteve Irwin\nrip@gmail.com\nblah',
|
||||||
'person_email': ANY},
|
'person_email': ANY},
|
||||||
headers=ANY)
|
headers=ANY)
|
||||||
mock_logger.assert_called_with(
|
mock_logger.assert_called_with(
|
||||||
|
|||||||
Reference in New Issue
Block a user