oncall-engine/engine/apps/public_api/serializers
Matias Bordese fa815b7ecd
Reworked declare incident escalation step (#5130)
Reworked https://github.com/grafana/oncall/pull/5047. Main update is the
switch from FK to a [M2M
relation](https://docs.google.com/document/d/1HeulqxoFShSHtInQrZNJLL5MDlHPNT50rVGaK3zZWvw/edit?disco=AAABVLjV4W8)
(which doesn't really change the original/intended behavior, besides not
needing to alter the alert group table, and it is a bit more flexible;
the extra table shouldn't introduce issues because this is used only for
tracking purposes and the information needed in the log record is
already there).

Avoid a db migration involving alert group table:

```
--
-- Create model RelatedIncident
--
CREATE TABLE `alerts_relatedincident` (`id` bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, `incident_id` varchar(50) NOT NULL, `created_at` datetime(6) NOT NULL, `is_active` bool NOT NULL, `channel_filter_id` bigint NULL, `organization_id` bigint NOT NULL);
CREATE TABLE `alerts_relatedincident_attached_alert_groups` (`id` bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, `relatedincident_id` bigint NOT NULL, `alertgroup_id` bigint NOT NULL);
ALTER TABLE `alerts_relatedincident` ADD CONSTRAINT `alerts_relatedincident_organization_id_incident_id_d7fc9a4f_uniq` UNIQUE (`organization_id`, `incident_id`);
ALTER TABLE `alerts_relatedincident` ADD CONSTRAINT `alerts_relatedincide_channel_filter_id_9556c836_fk_alerts_ch` FOREIGN KEY (`channel_filter_id`) REFERENCES `alerts_channelfilter` (`id`);
ALTER TABLE `alerts_relatedincident` ADD CONSTRAINT `alerts_relatedincide_organization_id_74ed6bed_fk_user_mana` FOREIGN KEY (`organization_id`) REFERENCES `user_management_organization` (`id`);
CREATE INDEX `alerts_relatedincident_incident_id_8356a799` ON `alerts_relatedincident` (`incident_id`);
ALTER TABLE `alerts_relatedincident_attached_alert_groups` ADD CONSTRAINT `alerts_relatedincident_a_relatedincident_id_alert_3d683baa_uniq` UNIQUE (`relatedincident_id`, `alertgroup_id`);
ALTER TABLE `alerts_relatedincident_attached_alert_groups` ADD CONSTRAINT `alerts_relatedincide_relatedincident_id_3e5e7a23_fk_alerts_re` FOREIGN KEY (`relatedincident_id`) REFERENCES `alerts_relatedincident` (`id`);
ALTER TABLE `alerts_relatedincident_attached_alert_groups` ADD CONSTRAINT `alerts_relatedincide_alertgroup_id_0125deca_fk_alerts_al` FOREIGN KEY (`alertgroup_id`) REFERENCES `alerts_alertgroup` (`id`);
```
2024-10-07 19:26:10 +00:00
..
__init__.py Update alert groups public API filters support (#4832) 2024-08-15 19:58:25 +00:00
action.py Fix action/webhook API not accepting empty/null user (#3094) 2023-10-03 14:33:05 +00:00
alert_groups.py Add latest alert to public api alert groups endpoint (#5059) 2024-10-02 17:09:50 +00:00
alerts.py remove all references to deprecated AlertGroup.is_restricted field (#3228) 2023-10-31 20:10:45 +00:00
escalation.py add POST /escalation public API endpoint + add public API docs for teams/organization endpoints (#4815) 2024-08-15 18:31:35 +00:00
escalation_chains.py Allow editing assigned team via public api (#1619) 2023-04-05 06:39:30 +00:00
escalation_policies.py Reworked declare incident escalation step (#5130) 2024-10-07 19:26:10 +00:00
integrations.py Fix validation of integration name when team is not present in request data (#4132) 2024-03-29 04:57:27 +00:00
integtration_heartbeat.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
maintenance.py add mypy static type checker to backend codebase (#2151) 2023-06-12 12:50:33 -04:00
on_call_shifts.py fix: Add rolling users validation for oncall shift API (#5050) 2024-09-20 21:06:33 +00:00
organizations.py remove organization maintenance mode + fix integration maintenance mode (#2511) 2023-07-12 16:41:44 -04:00
personal_notification_rules.py Fix duplicate orders on routes and escalation policies (#2568) 2023-07-18 17:17:53 +00:00
resolution_notes.py Allow OnCall API to use Grafana Service Accounts (#3189) 2023-11-23 16:42:27 +00:00
routes.py Fix routes and schedules public api endpoints (#3751) 2024-01-25 12:52:55 +00:00
schedules_base.py Fix routes and schedules public api endpoints (#3751) 2024-01-25 12:52:55 +00:00
schedules_calendar.py Add schedules enable_web_overrides option to public API (#3062) 2023-09-26 14:04:53 -03:00
schedules_ical.py Update ical schedule creation/update to trigger final schedule refresh (#3156) 2023-10-18 16:41:25 +00:00
schedules_polymorphic.py Initial web schedule model and serializers. Add override shift type. 2022-07-05 12:41:55 -03:00
schedules_web.py shift swap requests model + CRUD endpoints (#2597) 2023-07-21 19:35:19 +00:00
slack_channel.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
teams.py feat: add Grafana IDs to users and teams public API endpoints (#5075) 2024-09-24 19:16:22 +00:00
user_groups.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
users.py feat: add Grafana IDs to users and teams public API endpoints (#5075) 2024-09-24 19:16:22 +00:00
webhooks.py Allow webhook modification by API for advanced webhook (#4175) 2024-04-23 19:18:12 +00:00