Skip to content

Commit d3e8e6a

Browse files
committed
Signed-off-by: RAWx18 <rawx18.dev@gmail.com>
1 parent 385f2bd commit d3e8e6a

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

frontend/src/modules/devspace/pages/BacklogPage.vue

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,24 @@
8888
</template>
8989
</el-table-column>
9090
<el-table-column prop="title" label="Title" min-width="200" sortable />
91-
<el-table-column prop="status" label="Status" width="120" sortable>
91+
<el-table-column
92+
prop="status"
93+
label="Status"
94+
width="120"
95+
sortable
96+
:sort-method="(a, b) => getStatusOrder(a.status) - getStatusOrder(b.status)"
97+
>
9298
<template #default="{ row }">
9399
<el-tag size="small">{{ formatStatus(row.status) }}</el-tag>
94100
</template>
95101
</el-table-column>
96-
<el-table-column prop="priority" label="Priority" width="100" sortable>
102+
<el-table-column
103+
prop="priority"
104+
label="Priority"
105+
width="100"
106+
sortable
107+
:sort-method="(a, b) => getPriorityOrder(a.priority) - getPriorityOrder(b.priority)"
108+
>
97109
<template #default="{ row }">
98110
<span :class="['priority-badge', `priority-${row.priority}`]">
99111
{{ row.priority }}
@@ -213,6 +225,22 @@ const { activeProjectId, hasActiveProject } = useProject();
213225
// Only users (not contacts) can be assigned to issues
214226
const assignableMembers = computed(() => teamMembers.value.filter(m => m.isUser !== false));
215227
228+
// Status workflow order for sorting
229+
const STATUS_ORDER = ['backlog', 'todo', 'in_progress', 'review', 'done'];
230+
231+
const getStatusOrder = (status) => {
232+
const index = STATUS_ORDER.indexOf(status);
233+
return index === -1 ? 999 : index; // Unknown statuses go to the end
234+
};
235+
236+
// Priority order for sorting (highest to lowest urgency)
237+
const PRIORITY_ORDER = ['urgent', 'high', 'medium', 'low'];
238+
239+
const getPriorityOrder = (priority) => {
240+
const index = PRIORITY_ORDER.indexOf(priority);
241+
return index === -1 ? 999 : index; // Unknown priorities go to the end
242+
};
243+
216244
// Initial simple filtering (can be expanded)
217245
const filteredIssues = computed(() => issues.value);
218246

0 commit comments

Comments
 (0)