From a52d8cc737049ff4c1d516bb1deaacb67919ad4e Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 29 Nov 2022 10:42:10 +0100 Subject: [PATCH] fix(ui) - github/jira issue form data fetch --- frontend/app/components/Session_/Issues/IssueForm.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/Session_/Issues/IssueForm.js b/frontend/app/components/Session_/Issues/IssueForm.js index 4b6585985..43a7f382a 100644 --- a/frontend/app/components/Session_/Issues/IssueForm.js +++ b/frontend/app/components/Session_/Issues/IssueForm.js @@ -18,7 +18,6 @@ const SelectedValue = ({ icon, text }) => { class IssueForm extends React.PureComponent { componentDidMount() { const { projects, issueTypes } = this.props; - this.props.init({ projectId: projects[0] ? projects[0].id : '', issueType: issueTypes[0] ? issueTypes[0].id : '', @@ -27,8 +26,8 @@ class IssueForm extends React.PureComponent { componentWillReceiveProps(newProps) { const { instance } = this.props; - if (instance.projectId && newProps.instance.projectId != instance.projectId) { - this.props.fetchMeta(instance.projectId).then(() => { + if (newProps.instance.projectId && newProps.instance.projectId != instance.projectId) { + this.props.fetchMeta(newProps.instance.projectId).then(() => { this.props.edit({ issueType: '', assignee: '', projectId: newProps.instance.projectId }); }); } @@ -87,7 +86,7 @@ class IssueForm extends React.PureComponent {