@@ -23723,6 +23725,10 @@ CREATE INDEX index_esc_protected_branches_on_external_status_check_id ON externa
CREATE INDEX index_esc_protected_branches_on_protected_branch_id ON external_status_checks_protected_branches USING btree (protected_branch_id);
CREATE UNIQUE INDEX index_escalation_rules_on_all_attributes ON incident_management_escalation_rules USING btree (policy_id, oncall_schedule_id, status, elapsed_time_seconds, user_id);
CREATE INDEX index_escalation_rules_on_user ON incident_management_escalation_rules USING btree (user_id);
CREATE INDEX index_events_on_action ON events USING btree (action);
CREATE INDEX index_events_on_author_id_and_created_at ON events USING btree (author_id, created_at);
...
...
@@ -24441,8 +24447,6 @@ CREATE INDEX index_on_oncall_schedule_escalation_rule ON incident_management_esc
CREATE INDEX index_on_pages_metadata_not_migrated ON project_pages_metadata USING btree (project_id) WHERE ((deployed = true) AND (pages_deployment_id IS NULL));
CREATE UNIQUE INDEX index_on_policy_schedule_status_elapsed_time_escalation_rules ON incident_management_escalation_rules USING btree (policy_id, oncall_schedule_id, status, elapsed_time_seconds);
CREATE UNIQUE INDEX index_on_project_id_escalation_policy_name_unique ON incident_management_escalation_policies USING btree (project_id, name);
CREATE INDEX index_on_projects_lower_path ON projects USING btree (lower((path)::text));
...
...
@@ -25895,6 +25899,9 @@ ALTER TABLE ONLY epics
ALTER TABLE ONLY clusters_applications_runners
ADD CONSTRAINT fk_02de2ded36 FOREIGN KEY (runner_id) REFERENCES ci_runners(id) ON DELETE SET NULL;
ALTER TABLE ONLY incident_management_escalation_rules
@@ -9219,6 +9219,7 @@ Represents an escalation rule for an escalation policy.
| <aid="escalationruletypeid"></a>`id` | [`IncidentManagementEscalationRuleID`](#incidentmanagementescalationruleid) | ID of the escalation policy. |
| <aid="escalationruletypeoncallschedule"></a>`oncallSchedule` | [`IncidentManagementOncallSchedule`](#incidentmanagementoncallschedule) | The on-call schedule to notify. |
| <aid="escalationruletypestatus"></a>`status` | [`EscalationRuleStatus`](#escalationrulestatus) | The status required to prevent the rule from activating. |
| <aid="escalationruletypeuser"></a>`user` | [`UserCore`](#usercore) | The user to notify. |
### `Event`
...
...
@@ -16737,8 +16738,9 @@ Represents an escalation rule.
| Name | Type | Description |
| ---- | ---- | ----------- |
| <aid="escalationruleinputelapsedtimeseconds"></a>`elapsedTimeSeconds` | [`Int!`](#int) | The time in seconds before the rule is activated. |
| <aid="escalationruleinputoncallscheduleiid"></a>`oncallScheduleIid` | [`ID!`](#id) | The on-call schedule to notify. |
| <aid="escalationruleinputoncallscheduleiid"></a>`oncallScheduleIid` | [`ID`](#id) | The on-call schedule to notify. |
| <aid="escalationruleinputstatus"></a>`status` | [`EscalationRuleStatus!`](#escalationrulestatus) | The status required to prevent the rule from activating. |
| <aid="escalationruleinputusername"></a>`username` | [`String`](#string) | The username of the user to notify. |
validates:policy_id,uniqueness: {scope: [:oncall_schedule_id,:status,:elapsed_time_seconds],message: _('must have a unique schedule, status, and elapsed time')}
it{is_expected.tovalidate_uniqueness_of(:policy_id).scoped_to([:oncall_schedule_id,:status,:elapsed_time_seconds]).with_message('must have a unique schedule, status, and elapsed time')}
it{is_expected.tovalidate_uniqueness_of(:oncall_schedule_id).scoped_to([:policy_id,:status,:elapsed_time_seconds]).with_message('must be unique by status and elapsed time within a policy')}
it{is_expected.tovalidate_uniqueness_of(:user_id).scoped_to([:policy_id,:status,:elapsed_time_seconds]).with_message('must be unique by status and elapsed time within a policy')}
end
context'mutually exclusive attributes'do
context'when user and schedule are both provided'do