diff --git a/src/dispatch/case/flows.py b/src/dispatch/case/flows.py
index 0736474f4cfa..51dee63b5507 100644
--- a/src/dispatch/case/flows.py
+++ b/src/dispatch/case/flows.py
@@ -744,6 +744,15 @@ def common_escalate_flow(
db_session.add(incident)
db_session.commit()
+ # we run the incident create flow in a background task
+ incident = incident_flows.incident_create_flow(
+ incident_id=incident.id,
+ organization_slug=organization_slug,
+ db_session=db_session,
+ case_id=case.id,
+ )
+
+ # we link the case to the incident
case.incidents.append(incident)
db_session.add(case)
db_session.commit()
@@ -755,14 +764,6 @@ def common_escalate_flow(
case_id=case.id,
)
- # we run the incident create flow in a background task
- incident = incident_flows.incident_create_flow(
- incident_id=incident.id,
- organization_slug=organization_slug,
- db_session=db_session,
- case_id=case.id,
- )
-
# we add the case participants to the incident
for participant in case.participants:
# check to see if already a participant in the incident
diff --git a/src/dispatch/database/service.py b/src/dispatch/database/service.py
index 39dd25144cd0..ba326ff4edea 100644
--- a/src/dispatch/database/service.py
+++ b/src/dispatch/database/service.py
@@ -536,7 +536,7 @@ def search_filter_sort_paginate(
db_session,
model,
query_str: str = None,
- filter_spec: str = None,
+ filter_spec: str | dict | None = None,
page: int = 1,
items_per_page: int = 5,
sort_by: List[str] = None,
@@ -558,7 +558,10 @@ def search_filter_sort_paginate(
tag_all_filters = []
if filter_spec:
- filter_spec = json.loads(filter_spec)
+ # some functions pass filter_spec as dictionary such as auth/views.py/get_users
+ # but most come from API as seraialized JSON
+ if isinstance(filter_spec, str):
+ filter_spec = json.loads(filter_spec)
query = apply_filter_specific_joins(model_cls, filter_spec, query)
# if the filter_spec has the TagAll filter, we need to split the query up
# and intersect all of the results
diff --git a/src/dispatch/plugins/dispatch_slack/case/messages.py b/src/dispatch/plugins/dispatch_slack/case/messages.py
index 2281476d5e4d..554b0f717068 100644
--- a/src/dispatch/plugins/dispatch_slack/case/messages.py
+++ b/src/dispatch/plugins/dispatch_slack/case/messages.py
@@ -270,17 +270,19 @@ def create_action_buttons_message(
)
)
- elements.append(
- Button(
- text="💤 Snooze Alert",
- action_id=SignalNotificationActions.snooze,
- value=button_metadata,
- ),
- Button(
- text="👤 User MFA Challenge",
- action_id=CaseNotificationActions.user_mfa,
- value=button_metadata,
- ),
+ elements.extend(
+ [
+ Button(
+ text="💤 Snooze Alert",
+ action_id=SignalNotificationActions.snooze,
+ value=button_metadata,
+ ),
+ Button(
+ text="👤 User MFA Challenge",
+ action_id=CaseNotificationActions.user_mfa,
+ value=button_metadata,
+ ),
+ ]
)
# we create the signal metadata blocks
diff --git a/src/dispatch/signal/service.py b/src/dispatch/signal/service.py
index 751201594093..eff71818ccef 100644
--- a/src/dispatch/signal/service.py
+++ b/src/dispatch/signal/service.py
@@ -536,14 +536,6 @@ def update(*, db_session: Session, signal: Signal, signal_in: SignalUpdate) -> S
return signal
-def delete(*, db_session: Session, signal_id: int):
- """Deletes a signal definition."""
- signal = db_session.query(Signal).filter(Signal.id == signal_id).one()
- db_session.delete(signal)
- db_session.commit()
- return signal_id
-
-
def is_valid_uuid(val):
try:
uuid.UUID(str(val), version=4)
diff --git a/src/dispatch/signal/views.py b/src/dispatch/signal/views.py
index e8dab18aabe7..74202f39e4a8 100644
--- a/src/dispatch/signal/views.py
+++ b/src/dispatch/signal/views.py
@@ -36,7 +36,6 @@
create,
create_signal_engagement,
create_signal_filter,
- delete,
delete_signal_filter,
get,
get_by_primary_or_external_id,
@@ -330,19 +329,3 @@ def update_signal(
) from None
return signal
-
-
-@router.delete(
- "/{signal_id}",
- response_model=None,
- dependencies=[Depends(PermissionsDependency([SensitiveProjectActionPermission]))],
-)
-def delete_signal(db_session: DbSession, signal_id: Union[str, PrimaryKey]):
- """Deletes a signal."""
- signal = get_by_primary_or_external_id(db_session=db_session, signal_id=signal_id)
- if not signal:
- raise HTTPException(
- status_code=status.HTTP_404_NOT_FOUND,
- detail=[{"msg": "A signal with this id does not exist."}],
- )
- delete(db_session=db_session, signal_id=signal.id)
diff --git a/src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue b/src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue
index d4b76226f2b2..dd26008c21d3 100644
--- a/src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue
+++ b/src/dispatch/static/dispatch/src/case/CaseStatusSelectGroup.vue
@@ -197,7 +197,7 @@ const changeStatus = async (newStatus) => {
}
const openDialog = (newStatus) => {
- if (newStatus == "Escalated") {
+ if (newStatus == "Escalated" && !isActiveStatus("Escalated")) {
const caseDetails = store.state.case_management.selected
store.dispatch("case_management/showEscalateDialog", caseDetails)
return
diff --git a/src/dispatch/static/dispatch/src/case/EscalateDialog.vue b/src/dispatch/static/dispatch/src/case/EscalateDialog.vue
index 689a7be27478..30723c48a1c8 100644
--- a/src/dispatch/static/dispatch/src/case/EscalateDialog.vue
+++ b/src/dispatch/static/dispatch/src/case/EscalateDialog.vue
@@ -115,7 +115,7 @@ export default {
this.incidentDescription = this.caseDescription
this.incidentTitle = this.caseTitle
this.incidentProject = this.caseProject ? this.caseProject : null
- this.incidentType = this.caseType.incident_type ? this.caseType.incident_type : null
+ this.incidentType = this.caseType?.incident_type ? this.caseType.incident_type : null
}
)
},
diff --git a/src/dispatch/static/dispatch/src/case/store.js b/src/dispatch/static/dispatch/src/case/store.js
index 85a76d13e1c2..2da9c36e84a5 100644
--- a/src/dispatch/static/dispatch/src/case/store.js
+++ b/src/dispatch/static/dispatch/src/case/store.js
@@ -214,6 +214,8 @@ const actions = {
commit("SET_DIALOG_ESCALATE", false)
commit("RESET_SELECTED")
commit("incident/RESET_SELECTED", null, { root: true })
+ // force page reload to pick up the change to status
+ window.location.reload()
},
showHandoffDialog({ commit }, value) {
commit("SET_DIALOG_SHOW_HANDOFF", true)
diff --git a/src/dispatch/static/dispatch/src/incident/TimelineReportTab.vue b/src/dispatch/static/dispatch/src/incident/TimelineReportTab.vue
index 0518f1480ef0..adae8685783a 100644
--- a/src/dispatch/static/dispatch/src/incident/TimelineReportTab.vue
+++ b/src/dispatch/static/dispatch/src/incident/TimelineReportTab.vue
@@ -27,9 +27,6 @@