Add what we know of agreements to go live request

When we process a go live request it’s a pain to have to go fishing in
the Google Drive to see if there’s a signed agreement in there. This
should make it easier when we know there’s already an agreement.
This commit is contained in:
Chris Hill-Scott
2018-03-08 15:28:59 +00:00
parent b0278c5649
commit ce704a979d
2 changed files with 5 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ from app.main.forms import (
SMSPrefixForm,
)
from app.utils import (
GovernmentDomain,
email_safe,
get_cdn_domain,
user_has_permissions,
@@ -171,6 +172,7 @@ def request_to_go_live(service_id):
@user_has_permissions('manage_service')
def submit_request_to_go_live(service_id):
form = RequestToGoLiveForm()
agreement_info = GovernmentDomain.from_current_user()
if form.validate_on_submit():
try:
@@ -180,6 +182,7 @@ def submit_request_to_go_live(service_id):
'On behalf of {} ({})\n'
'\n---'
'\nOrganisation type: {}'
'\nAgreement signed: {} ({})'
'\nMOU in place: {}'
'\nChannel: {}\nStart date: {}\nStart volume: {}'
'\nPeak volume: {}'
@@ -188,6 +191,7 @@ def submit_request_to_go_live(service_id):
current_service['name'],
url_for('main.service_dashboard', service_id=current_service['id'], _external=True),
current_service['organisation_type'],
agreement_info.agreement_signed, agreement_info.owner,
form.mou.data,
formatted_list(filter(None, (
'email' if form.channel_email.data else None,

View File

@@ -530,6 +530,7 @@ def test_should_redirect_after_request_to_go_live(
returned_message = mock_post.call_args[1]['message']
assert 'On behalf of service one' in returned_message
assert 'Organisation type: central' in returned_message
assert 'Agreement signed: None (None)' in returned_message
assert 'Channel: email and text messages' in returned_message
assert 'Start date: 01/01/2017' in returned_message
assert 'Start volume: 100,000' in returned_message