Merge pull request #1108 from alphagov/feat-update-deskpro-ticket-subjects

Provide better subject lines for Deskpro tickets
This commit is contained in:
Pete Herlihy
2017-02-07 17:02:02 +00:00
committed by GitHub
4 changed files with 8 additions and 6 deletions

View File

@@ -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,

View File

@@ -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: {}'

View File

@@ -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',

View File

@@ -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,