Skip to content

Commit 744336f

Browse files
committed
show incident identifier on actions
1 parent 4aaf26b commit 744336f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

api/src/services/action-service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ export class ActionService {
1111
.whereRaw(`"actions"."incident_id" IN (SELECT "incident_id" FROM "incident_users_view" WHERE "user_email" = ?)`, [
1212
email,
1313
])
14-
.select("actions.*", "incidents.slug as incident_slug", "incidents.incident_type_id")
14+
.select(
15+
"actions.*",
16+
"incidents.slug as incident_slug",
17+
"incidents.incident_type_id",
18+
"incidents.identifier as incident_identifier"
19+
)
1520
.orderBy("actions.created_at", "desc");
1621
}
1722
async getCount(email: string, where: (query: Knex.QueryBuilder) => Knex.QueryBuilder): Promise<{ count: number }> {

web/src/components/report/ActionCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const { actions } = storeToRefs(actionStore);
5555
loadActions({ page: 1, perPage: 15, search: null, review: null, status: "Dashboard" });
5656
5757
function makeTitle(input: Action) {
58-
return input.description;
58+
return `${input.incident_identifier ? input.incident_identifier + " : " : ""}${input.description}`;
5959
}
6060
6161
function makeSubtitle(input: Action) {

web/src/store/ActionStore.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export interface Action {
182182
status?: ActionStatus;
183183
actor_display_name?: string;
184184
incident_slug?: string;
185+
incident_identifier?: string;
185186
incident_type_id?: number;
186187
}
187188

0 commit comments

Comments
 (0)