diff --git a/app/helpers/info_request_helper.rb b/app/helpers/info_request_helper.rb
index 3954b2814b..135b65b865 100644
--- a/app/helpers/info_request_helper.rb
+++ b/app/helpers/info_request_helper.rb
@@ -185,10 +185,14 @@ def status_text_internal_review(info_request, _opts = {})
public_body_link: public_body_link(info_request.public_body))
end
- def status_text_error_message(_info_request, _opts = {})
+ def status_text_error_message(info_request, _opts = {})
+ body = info_request.public_body
_('There was a delivery error or similar, which ' \
- 'needs fixing by the {{site_name}} team.',
- site_name: site_name)
+ 'needs fixing by the {{site_name}} team. Can you help by ' \
+ 'finding updated contact ' \
+ 'details?',
+ site_name: site_name,
+ change_request_url: new_change_request_body_path(body: body.url_name))
end
def status_text_requires_admin(_info_request, _opts = {})
diff --git a/doc/CHANGES.md b/doc/CHANGES.md
index fd2c76f18c..185e621a1b 100644
--- a/doc/CHANGES.md
+++ b/doc/CHANGES.md
@@ -2,6 +2,8 @@
## Highlighted Features
+* Signpost users to find new contact details for requests with delivery errors
+ (Gareth Rees)
* Add admin view of unmasked version of main body part attachments (Gareth Rees)
* Add internal ID number to authority CSV download (Alex Parsons, Graeme
Porteous)
diff --git a/spec/helpers/info_request_helper_spec.rb b/spec/helpers/info_request_helper_spec.rb
index 7455ebe966..a25c1d3185 100644
--- a/spec/helpers/info_request_helper_spec.rb
+++ b/spec/helpers/info_request_helper_spec.rb
@@ -359,9 +359,17 @@
context 'error_message' do
it 'returns a description' do
- allow(info_request).to receive(:calculate_status).and_return("error_message")
+ allow(info_request).
+ to receive(:public_body).and_return(double(url_name: 'foo'))
+
+ allow(info_request).
+ to receive(:calculate_status).and_return('error_message')
+
expected = 'There was a delivery error or similar, ' \
- 'which needs fixing by the Alaveteli team.'
+ 'which needs fixing by the Alaveteli team. Can you help ' \
+ 'by finding updated ' \
+ 'contact details?'
+
expect(status_text(info_request)).to eq(expected)
end