fix(工作台): 工作台我的待办展示了已关闭的缺陷
--bug=1021915 --user=陈建星 [我的工作台]我的待办-缺陷管理中有已关闭状态的缺陷 https://www.tapd.cn/55049933/s/1327005
This commit is contained in:
parent
e7abfb42a1
commit
982ddf19e2
|
@ -250,6 +250,9 @@ export default {
|
|||
},
|
||||
workspaceId() {
|
||||
return getCurrentWorkspaceId();
|
||||
},
|
||||
isToDo() {
|
||||
return !this.isFocus && !this.isCreation;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -262,9 +265,9 @@ export default {
|
|||
getIssuePartTemplateWithProject((template) => {
|
||||
this.initFields(template);
|
||||
this.page.result.loading = false;
|
||||
});
|
||||
this.getIssues();
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getCustomFieldValue(row, field, defaultVal) {
|
||||
|
@ -300,6 +303,9 @@ export default {
|
|||
item.filters = this.columns[item.id].filters;
|
||||
}
|
||||
}
|
||||
if (this.isToDo && item.id === '状态') {
|
||||
item.filters = item.filters.filter(i => i.value !== 'closed')
|
||||
}
|
||||
});
|
||||
|
||||
this.fields = fields;
|
||||
|
@ -350,17 +356,7 @@ export default {
|
|||
|
||||
}
|
||||
} else {
|
||||
if (this.page.condition.filters) {
|
||||
this.page.condition.filters.status = ["new"];
|
||||
} else {
|
||||
this.page.condition.filters = {status: ["new"]};
|
||||
}
|
||||
this.page.condition.combine = {
|
||||
creator: {
|
||||
operator: "current user",
|
||||
value: "current user",
|
||||
}
|
||||
}
|
||||
this.addDefaultStatusFilter();
|
||||
}
|
||||
this.page.condition.workspaceId = getCurrentWorkspaceId();
|
||||
this.page.condition.orders = getLastTableSortField(this.tableHeaderKey);
|
||||
|
@ -382,6 +378,34 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
addDefaultStatusFilter() {
|
||||
this.page.condition.combine = {
|
||||
creator: {
|
||||
operator: "current user",
|
||||
value: "current user",
|
||||
}
|
||||
}
|
||||
if (this.isToDo) {
|
||||
let statusFieldId = null;
|
||||
this.issueTemplate.customFields.forEach(field => {
|
||||
if (field.name === '状态') {
|
||||
statusFieldId = field.id;
|
||||
}
|
||||
});
|
||||
if (statusFieldId) {
|
||||
this.page.condition.combine.customs = [
|
||||
{
|
||||
id: statusFieldId,
|
||||
operator: 'not in',
|
||||
value:[
|
||||
'closed'
|
||||
],
|
||||
type: 'select'
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
},
|
||||
initCustomFieldValue() {
|
||||
if (this.fields.length <= 0) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue