Use correct key to set team in DeskPro

For the `POST` ticket endpoint, the parameter is `agent_team_id`:

https://manuals.deskpro.com/html/developer-apps/api/api-tickets.html#id2
This commit is contained in:
Chris Hill-Scott
2016-05-20 15:58:20 +01:00
parent d9dda51062
commit 228abf4526
4 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ def feedback():
data = { data = {
'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_DEPT_ID'), 'department_id': current_app.config.get('DESKPRO_DEPT_ID'),
'assigned_agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'), 'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
'subject': 'Notify feedback', 'subject': 'Notify feedback',
'message': 'Environment: {}\n\n{}\n{}\n{}'.format( 'message': 'Environment: {}\n\n{}\n{}\n{}'.format(
url_for('main.index', _external=True), url_for('main.index', _external=True),
@@ -35,7 +35,7 @@ def feedback():
resp.json()) resp.json())
) )
abort(500, "Feedback submission failed") abort(500, "Feedback submission failed")
flash("Thanks, we've received your feedback", 'default_with_tick') flash("Thanks, weve received your feedback", 'default_with_tick')
return redirect(url_for('.feedback')) return redirect(url_for('.feedback'))
return render_template('views/feedback.html', form=form) return render_template('views/feedback.html', form=form)

View File

@@ -102,7 +102,7 @@ def service_request_to_go_live(service_id):
data = { data = {
'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_DEPT_ID'), 'department_id': current_app.config.get('DESKPRO_DEPT_ID'),
'assigned_agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'), 'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
'subject': 'Request to go live', 'subject': 'Request to go live',
'message': "From {} <{}> on behalf of {} ({})\n\nUsage estimate\n---\n\n{}".format( 'message': "From {} <{}> on behalf of {} ({})\n\nUsage estimate\n---\n\n{}".format(
current_user.name, current_user.name,

View File

@@ -48,7 +48,7 @@ def test_post_feedback_with_no_name_email(app_, mocker):
ANY, ANY,
data={ data={
'department_id': ANY, 'department_id': ANY,
'assigned_agent_team_id': ANY, 'agent_team_id': ANY,
'subject': 'Notify feedback', 'subject': 'Notify feedback',
'message': 'Environment: http://localhost/\n\n\n\nblah', 'message': 'Environment: http://localhost/\n\n\n\nblah',
'person_email': ANY}, 'person_email': ANY},
@@ -70,7 +70,7 @@ def test_post_feedback_with_name_email(app_, mocker):
data={ data={
'subject': 'Notify feedback', 'subject': 'Notify feedback',
'department_id': ANY, 'department_id': ANY,
'assigned_agent_team_id': ANY, 'agent_team_id': ANY,
'message': 'Environment: http://localhost/\n\nSteve 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)
@@ -96,7 +96,7 @@ def test_log_error_on_post(app_, mocker):
data={ data={
'subject': 'Notify feedback', 'subject': 'Notify feedback',
'department_id': ANY, 'department_id': ANY,
'assigned_agent_team_id': ANY, 'agent_team_id': ANY,
'message': 'Environment: http://localhost/\n\nSteve 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)

View File

@@ -239,7 +239,7 @@ def test_should_redirect_after_request_to_go_live(
data={ data={
'subject': 'Request to go live', 'subject': 'Request to go live',
'department_id': ANY, 'department_id': ANY,
'assigned_agent_team_id': ANY, 'agent_team_id': ANY,
'message': 'From Test User <test@user.gov.uk> on behalf of Test Service (http://localhost/services/6ce466d0-fd6a-11e5-82f5-e0accb9d11a6/dashboard)\n\nUsage estimate\n---\n\nOne million messages', # noqa 'message': 'From Test User <test@user.gov.uk> on behalf of Test Service (http://localhost/services/6ce466d0-fd6a-11e5-82f5-e0accb9d11a6/dashboard)\n\nUsage estimate\n---\n\nOne million messages', # noqa
'person_email': ANY 'person_email': ANY
}, },