Add support for the operator channel

Was just in one of those meetings where it felt like writing this would
take less time than I’d already spent talking about its relative
priority…

---

In the admin app you can already set the broadcast channel as 'test', 'severe' or 'government'.

Aim:
- Add the 'operator' channel to the list of channels you can pick for the admin app broadcast services

Note:
- The API already supports this - https://github.com/alphagov/notifications-api/pull/3262
- The CBC proxy does not yet support the operator channel and this will need a separate card. That card has not yet been written because the interface has not been agreed between us and the MNOs yet.
- Will need to have the ability to select the operator channel for just a single MNO like we do for the other channels
- If we add this, we shouldn't actually start using it until the MNO in question gives us the go ahead.

---

https://www.pivotaltracker.com/story/show/178485177
This commit is contained in:
Chris Hill-Scott
2021-06-11 12:03:38 +01:00
parent cc1a8254df
commit 2d36ec8214
5 changed files with 42 additions and 8 deletions

View File

@@ -1312,10 +1312,10 @@ class ConfirmBroadcastForm(StripWhitespaceForm):
@staticmethod
def generate_label(channel, max_phones):
if channel == 'test':
if channel in {'test', 'operator'}:
return (
'I understand this will alert anyone who has switched '
'on the test channel'
f'I understand this will alert anyone who has switched '
f'on the {channel} channel'
)
if channel == 'severe':
return (
@@ -2382,6 +2382,7 @@ class ServiceBroadcastChannelForm(StripWhitespaceForm):
thing='mode or channel',
choices=[
("training", "Training mode"),
("operator", "Operator channel"),
("test", "Test channel"),
("severe", "Live channel"),
("government", "Government channel"),
@@ -2435,7 +2436,7 @@ class ServiceBroadcastAccountTypeForm(StripWhitespaceForm):
] +
[
(f"live-{broadcast_channel}-{provider}", "")
for broadcast_channel in ["test", "severe", "government"]
for broadcast_channel in ["test", "operator", "severe", "government"]
for provider in ["all", "ee", "o2", "three", "vodafone"]
],
validators=[DataRequired()]