This is an automated email from the ASF dual-hosted git repository.

mappjzc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 1a8e48a40 fix(config-ui): data scope cannot select error in zentao 
(#4993)
1a8e48a40 is described below

commit 1a8e48a400cd5930c856c04c531cf16ed6c29396
Author: 青湛 <[email protected]>
AuthorDate: Fri Apr 21 11:09:15 2023 +0800

    fix(config-ui): data scope cannot select error in zentao (#4993)
---
 config-ui/src/plugins/components/data-scope-form/index.tsx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/config-ui/src/plugins/components/data-scope-form/index.tsx 
b/config-ui/src/plugins/components/data-scope-form/index.tsx
index 22fa7d63c..2e60b5436 100644
--- a/config-ui/src/plugins/components/data-scope-form/index.tsx
+++ b/config-ui/src/plugins/components/data-scope-form/index.tsx
@@ -96,21 +96,21 @@ export const DataScopeForm = ({
       const data = await Promise.all(scope.map((sc: any) => getDataScope(sc)));
       const res =
         plugin === 'zentao'
-          ? await Promise.all([
-              API.updateDataScopeWithType(plugin, connectionId, 'product', {
+          ? [
+              ...(await API.updateDataScopeWithType(plugin, connectionId, 
'product', {
                 data: data.filter((s) => s.type !== 'project'),
-              }),
-              API.updateDataScopeWithType(plugin, connectionId, 'project', {
+              })),
+              ...(await API.updateDataScopeWithType(plugin, connectionId, 
'project', {
                 data: data.filter((s) => s.type === 'project'),
-              }),
-            ])
+              })),
+            ]
           : await API.updateDataScope(plugin, connectionId, {
               data,
             });
 
       onSubmit?.(
         res.map((it: any) => ({
-          id: it[getPluginId(plugin)],
+          id: plugin === 'zentao' ? `${it.type}/${it.id}` : 
it[getPluginId(plugin)],
           entities,
         })),
         res,

Reply via email to