diff --git a/app/main/views/feedback.py b/app/main/views/feedback.py index 8bd6a7bb1..e99d6e1ba 100644 --- a/app/main/views/feedback.py +++ b/app/main/views/feedback.py @@ -96,7 +96,7 @@ def feedback(ticket_type): 'person_name': user_name, 'department_id': current_app.config.get('DESKPRO_DEPT_ID'), 'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'), - 'subject': 'Notify feedback', + 'subject': 'Notify feedback {}'.format(user_name), 'message': feedback_msg, 'label': ticket_type, 'urgency': 10 if urgent else 1, diff --git a/app/main/views/service_settings.py b/app/main/views/service_settings.py index e439de672..098bef06d 100644 --- a/app/main/views/service_settings.py +++ b/app/main/views/service_settings.py @@ -109,7 +109,7 @@ def service_request_to_go_live(service_id): 'person_name': current_user.name, 'department_id': current_app.config.get('DESKPRO_DEPT_ID'), 'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'), - 'subject': 'Request to go live', + 'subject': 'Request to go live - {}'.format(current_service['name']), 'message': ( 'On behalf of {} ({})\n\nExpected usage\n---' '\nMOU in place: {}' diff --git a/tests/app/main/views/test_feedback.py b/tests/app/main/views/test_feedback.py index 56da05a83..d5ba67544 100644 --- a/tests/app/main/views/test_feedback.py +++ b/tests/app/main/views/test_feedback.py @@ -76,9 +76,11 @@ def test_passed_non_logged_in_user_details_through_flow(client, mocker, ticket_t return_value=Mock(status_code=201) ) + data = {'feedback': 'blah', 'name': 'Steve Irwin', 'email_address': 'rip@gmail.com'} + resp = client.post( url_for('main.feedback', ticket_type=ticket_type), - data={'feedback': 'blah', 'name': 'Steve Irwin', 'email_address': 'rip@gmail.com'}, + data=data ) assert resp.status_code == 302 @@ -88,7 +90,7 @@ def test_passed_non_logged_in_user_details_through_flow(client, mocker, ticket_t data={ 'department_id': ANY, 'agent_team_id': ANY, - 'subject': 'Notify feedback', + 'subject': 'Notify feedback {}'.format(data['name']), 'message': 'Environment: http://localhost/\n\nblah', 'person_email': 'rip@gmail.com', 'person_name': 'Steve Irwin', @@ -128,7 +130,7 @@ def test_passes_user_details_through_flow( data={ 'department_id': ANY, 'agent_team_id': ANY, - 'subject': 'Notify feedback', + 'subject': 'Notify feedback Test User', 'message': ANY, 'person_email': 'test@user.gov.uk', 'person_name': 'Test User', diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index a87c7e245..46dacf863 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -303,7 +303,7 @@ def test_should_redirect_after_request_to_go_live( mock_post.assert_called_with( ANY, data={ - 'subject': 'Request to go live', + 'subject': 'Request to go live - Test Service', 'department_id': ANY, 'agent_team_id': ANY, 'message': ANY,