This is an automated email from the ASF dual-hosted git repository.
likyh 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 3e7ae9a64 fix(config-ui): some bugs for transformation (#4550)
3e7ae9a64 is described below
commit 3e7ae9a644f08b25323ea908501c50d83b169766
Author: 青湛 <[email protected]>
AuthorDate: Wed Mar 1 10:49:08 2023 +0800
fix(config-ui): some bugs for transformation (#4550)
* fix(config-ui): missed spaces between text
* fix(config-ui): display the error information returned by the api
* fix(config-ui): issue type cannot be selected in jira
---
config-ui/src/plugins/components/transformation/index.tsx | 2 +-
.../src/plugins/components/transformation/use-transformation.ts | 1 +
config-ui/src/plugins/register/jira/transformation.tsx | 7 +++----
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/config-ui/src/plugins/components/transformation/index.tsx
b/config-ui/src/plugins/components/transformation/index.tsx
index 6905d9e5a..389eb1f83 100644
--- a/config-ui/src/plugins/components/transformation/index.tsx
+++ b/config-ui/src/plugins/components/transformation/index.tsx
@@ -63,7 +63,7 @@ export const Transformation = ({ from, plugin, connectionId,
onCancel, ...props
<S.Wrapper>
{TIPS_MAP[plugin] && (
<div className="tips">
- To learn about how {TIPS_MAP[plugin].name} transformation is used in
DevLake,
+ To learn about how {TIPS_MAP[plugin].name} transformation is used in
DevLake,{' '}
<ExternalLink link={TIPS_MAP[plugin].link}>check out this
doc</ExternalLink>.
</div>
)}
diff --git
a/config-ui/src/plugins/components/transformation/use-transformation.ts
b/config-ui/src/plugins/components/transformation/use-transformation.ts
index f277bb5ad..9c694536e 100644
--- a/config-ui/src/plugins/components/transformation/use-transformation.ts
+++ b/config-ui/src/plugins/components/transformation/use-transformation.ts
@@ -108,6 +108,7 @@ export const useTransformation = ({
}),
{
setOperating: setSaving,
+ formatReason: (err) => (err as any).response?.data?.message,
},
);
diff --git a/config-ui/src/plugins/register/jira/transformation.tsx
b/config-ui/src/plugins/register/jira/transformation.tsx
index a39c475f2..3ccf38a0e 100644
--- a/config-ui/src/plugins/register/jira/transformation.tsx
+++ b/config-ui/src/plugins/register/jira/transformation.tsx
@@ -83,9 +83,9 @@ export const JiraTransformation = ({ connectionId,
transformation, setTransforma
const [requirementItems, bugItems, incidentItems] = useMemo(() => {
return [
- (issueTypes ?? []).filter((it) => requirements.includes(it.name)),
- (issueTypes ?? []).filter((it) => bugs.includes(it.name)),
- (issueTypes ?? []).filter((it) => incidents.includes(it.name)),
+ (data?.issueTypes ?? []).filter((it) => requirements.includes(it.name)),
+ (data?.issueTypes ?? []).filter((it) => bugs.includes(it.name)),
+ (data?.issueTypes ?? []).filter((it) => incidents.includes(it.name)),
];
}, [requirements, bugs, incidents, data?.issueTypes]);
@@ -110,7 +110,6 @@ export const JiraTransformation = ({ connectionId,
transformation, setTransforma
return acc;
}, {} as any);
};
-
return (
<S.TransformationWrapper>
{/* Issue Tracking */}