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 d5288c9d1 fix(config-ui): existing config value will be missed (#6184)
d5288c9d1 is described below
commit d5288c9d1749ba349eeb173f7d10841b2de4c89f
Author: 青湛 <[email protected]>
AuthorDate: Sat Oct 7 16:20:34 2023 +1300
fix(config-ui): existing config value will be missed (#6184)
---
.../src/plugins/register/jira/transformation-fields/remote-link.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
b/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
index 5bf73ff75..2d53e6abc 100644
--- a/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
+++ b/config-ui/src/plugins/register/jira/transformation-fields/remote-link.tsx
@@ -32,7 +32,7 @@ interface Props {
}
export const RemoteLink = ({ transformation, setTransformation }: Props) => {
- const [index, setInedx] = useState(0);
+ const [index, setInedx] = useState<number>();
const [pattern, setPattern] = useState('');
const [error, setError] = useState('');
const [links, setLinks] = useState<Array<{ pattern: string; regex: string
}>>(
@@ -56,7 +56,7 @@ export const RemoteLink = ({ transformation,
setTransformation }: Props) => {
});
if (success) {
- setLinks(links.map((link, i) => (i === index ? res : link)));
+ setLinks(links.map((link, i) => (i === index ? { ...res, pattern } :
link)));
} else {
setError(res?.response?.data?.message ?? '');
}