Allow custom notes when service goes live

This adds an option on the organisation settings page to add
'request_to_go_live_notes'. When a service belonging to this
organisation requests to go live, any go live notes for the
organisation will be added to the Zendesk ticket in the 'Agreement
signed' section.
This commit is contained in:
Katie Smith
2019-05-13 14:50:40 +01:00
parent e4b1759b3b
commit da971b2da7
9 changed files with 186 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ class Organisation(JSONModel):
'agreement_signed_by_id',
'agreement_signed_version',
'domains',
'request_to_go_live_notes',
}
def __init__(self, _dict):
@@ -30,14 +31,13 @@ class Organisation(JSONModel):
self.agreement_signed = None
self.domains = []
self.organisation_type = None
self.request_to_go_live_notes = None
def as_human_readable(self, fallback_domain):
if 'dwp.' in ''.join(self.domains):
return 'DWP - Requires OED approval'
if self.agreement_signed:
return 'Yes, on behalf of {}'.format(self.name)
agreement_statement = 'Yes, on behalf of {}.'.format(self.name)
elif self.name:
return '{} (organisation is {}, {})'.format(
agreement_statement = '{} (organisation is {}, {}).'.format(
{
False: 'No',
None: 'Cant tell',
@@ -50,7 +50,12 @@ class Organisation(JSONModel):
}.get(self.crown),
)
else:
return 'Cant tell (domain is {})'.format(fallback_domain)
agreement_statement = 'Cant tell (domain is {}).'.format(fallback_domain)
if self.request_to_go_live_notes:
agreement_statement = agreement_statement + ' ' + self.request_to_go_live_notes
return agreement_statement
def as_info_for_branding_request(self, fallback_domain):
return self.name or 'Cant tell (domain is {})'.format(fallback_domain)