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

klesh 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 02a3be3d2 fix(config-ui): catch jira dev panel throw error (#5631)
02a3be3d2 is described below

commit 02a3be3d2cc054b9b4ec54ff714c3a843f402bde
Author: 青湛 <[email protected]>
AuthorDate: Thu Jul 6 14:13:02 2023 +1200

    fix(config-ui): catch jira dev panel throw error (#5631)
---
 .../src/plugins/register/jira/transformation-fields/dev-panel.tsx   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/config-ui/src/plugins/register/jira/transformation-fields/dev-panel.tsx 
b/config-ui/src/plugins/register/jira/transformation-fields/dev-panel.tsx
index 6e53873f9..9a502f1aa 100644
--- a/config-ui/src/plugins/register/jira/transformation-fields/dev-panel.tsx
+++ b/config-ui/src/plugins/register/jira/transformation-fields/dev-panel.tsx
@@ -19,7 +19,7 @@
 import { useEffect, useState } from 'react';
 import { InputGroup, Button, RadioGroup, Radio, Icon, Collapse } from 
'@blueprintjs/core';
 
-import { Dialog, FormItem } from '@/components';
+import { Dialog, FormItem, toast } from '@/components';
 import JiraIssueTipsImg from '@/images/jira-issue-tips.png';
 import { operator } from '@/utils';
 
@@ -87,9 +87,11 @@ export const DevPanel = ({ connectionId, transformation, 
setTransformation, isOp
       hideToast: true,
     });
 
-    if (success) {
+    if (success && res) {
       setApplicationTypes(res);
       setApplicationType(res[0]);
+    } else {
+      toast.error('Cannot find the Jira issue, please input the right issue 
key.');
     }
   };
 

Reply via email to