refactor: 缺陷默认通知创建人 --bug=1006001 --user=刘瑞斌 【消息通知】缺陷-更新... https://www.tapd.cn/55049933/s/1037696

This commit is contained in:
Captain.B 2021-08-23 14:20:51 +08:00 committed by 刘瑞斌
parent 34073ac9db
commit 24cf530815
1 changed files with 0 additions and 11 deletions

View File

@ -287,28 +287,20 @@ export default {
},
handleReceivers(row) {
let testPlanReceivers = JSON.parse(JSON.stringify(this.defectReceiverOptions));
let i = row.userIds.indexOf('PROCESSOR');
let i2 = row.userIds.indexOf('CREATOR');
switch (row.event) {
case "CREATE":
if (i2 > -1) {
row.userIds.splice(i2, 1);
}
if (i > -1) {
row.userIds.splice(i, 1);
}
break;
case "UPDATE":
case "STATUS_CHANGE":
testPlanReceivers.unshift({id: 'PROCESSOR', name: '处理人'});
testPlanReceivers.unshift({id: 'CREATOR', name: this.$t('commons.create_user')});
if (row.isSet) {
if (i2 < 0) {
row.userIds.unshift('CREATOR');
}
if (i < 0) {
row.userIds.unshift('PROCESSOR');
}
}
break;
case "DELETE":
@ -318,9 +310,6 @@ export default {
row.userIds.unshift('CREATOR');
}
}
if (i > -1) {
row.userIds.splice(i, 1);
}
break;
default:
break;