@@ -23723,6 +23751,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 +24473,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));
...
...
@@ -24631,6 +24661,8 @@ CREATE INDEX index_pool_repositories_on_shard_id ON pool_repositories USING btre
CREATE UNIQUE INDEX index_pool_repositories_on_source_project_id_and_shard_id ON pool_repositories USING btree (source_project_id, shard_id);
CREATE UNIQUE INDEX index_postgres_async_indexes_on_name ON postgres_async_indexes USING btree (name);
CREATE INDEX index_postgres_reindex_actions_on_index_identifier ON postgres_reindex_actions USING btree (index_identifier);
CREATE UNIQUE INDEX index_programming_languages_on_name ON programming_languages USING btree (name);
...
...
@@ -25895,6 +25927,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