diff --git a/src/dispatch/incident/models.py b/src/dispatch/incident/models.py
index 4b2ee2d5b3d4..75b5dbb77036 100644
--- a/src/dispatch/incident/models.py
+++ b/src/dispatch/incident/models.py
@@ -285,6 +285,7 @@ def description_required(cls, v):
class IncidentCreate(IncidentBase):
commander: Optional[ParticipantUpdate]
+ commander_email: Optional[str]
incident_priority: Optional[IncidentPriorityCreate]
incident_severity: Optional[IncidentSeverityCreate]
incident_type: Optional[IncidentTypeCreate]
diff --git a/src/dispatch/incident/service.py b/src/dispatch/incident/service.py
index 436d90490d1e..0f6c09612c7c 100644
--- a/src/dispatch/incident/service.py
+++ b/src/dispatch/incident/service.py
@@ -224,7 +224,9 @@ def create(*, db_session, incident_in: IncidentCreate) -> Incident:
# add commander
commander_email = commander_service_id = None
- if incident_in.commander:
+ if incident_in.commander_email:
+ commander_email = incident_in.commander_email
+ elif incident_in.commander:
commander_email = incident_in.commander.individual.email
else:
commander_email, commander_service_id = resolve_and_associate_role(
diff --git a/src/dispatch/static/dispatch/src/incident/ReportSubmissionCard.vue b/src/dispatch/static/dispatch/src/incident/ReportSubmissionCard.vue
index 066ea2ae2354..b1b1d6fbe1b2 100644
--- a/src/dispatch/static/dispatch/src/incident/ReportSubmissionCard.vue
+++ b/src/dispatch/static/dispatch/src/incident/ReportSubmissionCard.vue
@@ -68,6 +68,17 @@
+
+
+
@@ -105,6 +116,7 @@ import IncidentPrioritySelect from "@/incident/priority/IncidentPrioritySelect.v
import IncidentTypeSelect from "@/incident/type/IncidentTypeSelect.vue"
import ProjectSelect from "@/project/ProjectSelect.vue"
import TagFilterAutoComplete from "@/tag/TagFilterAutoComplete.vue"
+import ParticipantSelect from "@/components/ParticipantSelect.vue"
export default {
setup() {
@@ -119,12 +131,20 @@ export default {
IncidentPrioritySelect,
ProjectSelect,
TagFilterAutoComplete,
+ ParticipantSelect,
},
data() {
return {
isSubmitted: false,
project_faq: null,
+ local_commander: null,
+ only_one: (value) => {
+ if (value && value.length > 1) {
+ return "Only one is allowed"
+ }
+ return true
+ },
}
},
@@ -132,7 +152,7 @@ export default {
...mapFields("incident", [
"selected.incident_priority",
"selected.incident_type",
- "selected.commander",
+ "selected.commander_email",
"selected.title",
"selected.tags",
"selected.description",
@@ -248,9 +268,12 @@ export default {
vm.incident_type,
vm.title,
vm.description,
+ vm.local_commander,
vm.tags,
],
() => {
+ if (Array.isArray(this.local_commander))
+ this.commander_email = this.local_commander[0].individual.email
var queryParams = {
project: this.project ? this.project.name : null,
incident_priority: this.incident_priority ? this.incident_priority.name : null,
@@ -258,6 +281,7 @@ export default {
title: this.title,
description: this.description,
tag: this.tags ? this.tags.map((tag) => tag.name) : null,
+ commander_email: this.commander_email,
}
Object.keys(queryParams).forEach((key) => (queryParams[key] ? {} : delete queryParams[key]))
router