From 670a7dfd11bdf82a2f05301c7b28c85ec7dd5119 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 29 May 2020 11:05:08 +0800 Subject: [PATCH 1/3] '' --- frontend/src/common/js/ajax.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/common/js/ajax.js b/frontend/src/common/js/ajax.js index a0d27f10ad..1013b80008 100644 --- a/frontend/src/common/js/ajax.js +++ b/frontend/src/common/js/ajax.js @@ -18,6 +18,8 @@ export default { callback: () => { window.location.href = "/login" } + }).then(r => { + }); }; From a3f97c83624aea7f3472700e75c51ae4bbf4f010 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 29 May 2020 11:05:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/components/project/MsProject.vue | 17 +++++++++++++---- .../components/settings/system/Organization.vue | 2 +- .../settings/system/SystemWorkspace.vue | 2 +- frontend/src/i18n/en-US.js | 3 ++- frontend/src/i18n/zh-CN.js | 3 ++- frontend/src/i18n/zh-TW.js | 3 ++- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/frontend/src/business/components/project/MsProject.vue b/frontend/src/business/components/project/MsProject.vue index a185d93618..da3598bf48 100644 --- a/frontend/src/business/components/project/MsProject.vue +++ b/frontend/src/business/components/project/MsProject.vue @@ -37,10 +37,10 @@ - + - + @@ -87,8 +87,17 @@ rules: { name: [ {required: true, message: this.$t('project.input_name'), trigger: 'blur'}, - {min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'} - ] + {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}, + { + required: true, + pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/, + message: this.$t('project.special_characters_are_not_supported'), + trigger: 'blur' + } + ], + description: [ + {max: 50, message: this.$t('commons.input_limit', [0, 50]), trigger: 'blur'} + ], }, } }, diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index 0150c7e10c..c64a579a1e 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -218,7 +218,7 @@ rule: { name: [ {required: true, message: this.$t('organization.input_name'), trigger: 'blur'}, - {min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}, + {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}, { required: true, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index 87a6983ac2..dfb8091e9f 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -447,7 +447,7 @@ rules: { name: [ {required: true, message: this.$t('workspace.input_name'), trigger: 'blur'}, - {min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}, + {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}, { required: true, pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/, diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 4aa8310390..b6da7a8c52 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -114,7 +114,7 @@ export default { 'input_name': 'Please enter a organization name', 'select_organization': 'Please select organization', 'search_by_name': 'Search by name', - 'special_characters_are_not_supported': 'Special characters are not supported', + 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')', 'none': 'None Organization', 'select': 'Select Organization', }, @@ -129,6 +129,7 @@ export default { 'input_name': 'Please enter a workspace name', 'owning_workspace': 'Owning Workspace', 'please_choose_workspace': 'Please select Workspace', + 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')', }, member: { 'create': 'Create', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index c0bd508f19..d88a306271 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -113,7 +113,7 @@ export default { 'input_name': '请输入组织名称', 'select_organization': '请选择组织', 'search_by_name': '根据名称搜索', - 'special_characters_are_not_supported': '不支持特殊字符', + 'special_characters_are_not_supported': '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)', 'none': '无组织', 'select': '选择组织', }, @@ -127,6 +127,7 @@ export default { 'input_name': '请输入项目名称', 'owning_workspace': '所属工作空间', 'please_choose_workspace': '请选择工作空间', + 'special_characters_are_not_supported': '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)', }, member: { 'create': '添加成员', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 44f50b2114..be2a853c98 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -113,7 +113,7 @@ export default { 'input_name': '請輸入組織名稱', 'select_organization': '請選擇組織', 'search_by_name': '根據名稱搜索', - 'special_characters_are_not_supported': '不支持特殊字符', + 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')', 'none': '無組織', 'select': '選擇組織', }, @@ -127,6 +127,7 @@ export default { 'input_name': '請輸入項目名稱', 'owning_workspace': '所屬工作空間', 'please_choose_workspace': '請選擇工作空間', + 'special_characters_are_not_supported': '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)', }, member: { 'create': '添加成員', From a07e58e54f173f570f6f8f56670e4ff29887a567 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 29 May 2020 11:24:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml index 98874d7480..2ccd8dede8 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml @@ -15,6 +15,7 @@ and w.id = #{proRequest.workspaceId} + order by p.update_time desc