From b91babc67e5ea3b9a5e0d01a85dc75708ed486d4 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 7 Jun 2022 13:46:02 +0100 Subject: [PATCH] Fix relative URLs in support tickets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we get a support ticket we put a link to the service at the end. As part of 8b7f2fbf041c182156cbdb4d3fbadc1c851e6653 we accidentally made these URLs relative, rather than absolute. This means they aren’t made into links by email clients or Zendesk. This commit fixes the links to include the domain again. --- app/templates/support-tickets/support-ticket.txt | 2 +- tests/app/main/views/test_feedback.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/templates/support-tickets/support-ticket.txt b/app/templates/support-tickets/support-ticket.txt index 109699bab..08fd2629d 100644 --- a/app/templates/support-tickets/support-ticket.txt +++ b/app/templates/support-tickets/support-ticket.txt @@ -1,5 +1,5 @@ {{ content }} {% if current_service -%} Service: "{{ current_service.name }}" -{{ url_for('main.service_dashboard', service_id=current_service.id) }} +{{ url_for('main.service_dashboard', service_id=current_service.id, _external=True) }} {% endif %} diff --git a/tests/app/main/views/test_feedback.py b/tests/app/main/views/test_feedback.py index 4606461d2..8f73087ca 100644 --- a/tests/app/main/views/test_feedback.py +++ b/tests/app/main/views/test_feedback.py @@ -237,6 +237,7 @@ def test_passes_user_details_through_flow( url_for( 'main.service_dashboard', service_id=SERVICE_ONE_ID, + _external=True, ), '' ])