mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
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:
@@ -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: 'Can’t tell',
|
||||
@@ -50,7 +50,12 @@ class Organisation(JSONModel):
|
||||
}.get(self.crown),
|
||||
)
|
||||
else:
|
||||
return 'Can’t tell (domain is {})'.format(fallback_domain)
|
||||
agreement_statement = 'Can’t 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 'Can’t tell (domain is {})'.format(fallback_domain)
|
||||
|
||||
Reference in New Issue
Block a user