Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add formatting to Slack notifications if meets pilot testing criteria #3944

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Nov 13, 2024

Quick solution to request from Silvia here https://opensystemslab.slack.com/archives/C5Q59R3HB/p1731492906193889

If a submisison fits the criteria of ODP Pilot Testing, we want to visually differentiate it's notification in the #planx-notifications channel on Slack with a :large_orange_square: emoji prefix

isPilotEvent = true;
}
});
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples of live messages that should meet pilot criteria:

  • New Uniform submission 62725ee7-db0f-4e22-b4e5-3885115154cd [Lambeth]
  • New BOPS submission 24-00213-LDCP [https://camden.bops.services/api/v2/planning_applications]
  • New S3 + Power Automate submission "Apply for a lawful development certificate" 0d343b34-39aa-451a-ae5e-6aa805e6320e [barnet]

Examples that should not:

  • New S3 + Power Automate submission "Report a planning breach" 0d343b34-39aa-451a-ae5e-6aa805e6320e [barnet]
  • New email submission "Apply for building regulations applications" d62ec563-35ef-4399-aef0-29bff9c94afe [buckinghamshire]
  • New email submission "Pre application advice" 9ef9857e-eed4-4db3-b71e-da0595290c4b [doncaster]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jessicamcinchak how would I test this? Would I run through a service and track the what gets sent post submission?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These notifications are handled via Hasura Event triggers per send destination audit table - so you can do submissions & inspect logs via Hasura Console like screenshot below. BUT we only post to Slack in the production environment (not pizzas or staging to avoid noise), so Response "message" is just going to say "Skipping notification..."
Screenshot from 2024-11-13 13-40-42

Slack notifications are a bit of a superfluous feature (purely internal convenience & visibility for our own team from pre-Submissions Log days, no logical or functional dependencies) that can be fixed forward IMO !

@jessicamcinchak jessicamcinchak marked this pull request as ready for review November 13, 2024 11:52
@jessicamcinchak jessicamcinchak requested a review from a team November 13, 2024 11:52
Copy link

github-actions bot commented Nov 13, 2024

Removed vultr server and associated DNS entries

Copy link
Contributor

@RODO94 RODO94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks correct and straightforward, although I wasn't sure how best to test.

I aligned the pilotCouncils array with Silvia's message on Slack and it looks good with team slugs and I assume the pilotServices array relates to the services HHPP (householder planning permission) and Lawful Development Certificates (LDCs)?

@jessicamcinchak jessicamcinchak merged commit dee5e1a into main Nov 13, 2024
12 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/pilot-testing-slack-notification-format branch November 13, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants