Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MI-2228]:Fixed Jira Issue 819 (Create issue modal crashes when assignee is selected before switching projects) #8

Merged
merged 12 commits into from
Oct 19, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import BackendSelector, {Props as BackendSelectorProps} from '../backend_selecto

type Props = BackendSelectorProps & {
projectKey: string;
searchUsers: (params: {project: string; q: string}) => Promise<{data: JiraUser[]; error?: Error}>;
searchUsers: (params: {project: string; q: string}) => Promise<{data: {label: string; value: JiraUser[]}; error?: Error}>;
};

export default class JiraUserSelector extends React.PureComponent<Props> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ export default class CreateIssueForm extends React.PureComponent<Props, State> {
});

let fields = {
...this.state.fields,
summary: this.state.fields.summary,
description: this.state.fields.description,
manojmalik20 marked this conversation as resolved.
Show resolved Hide resolved
project: {key: projectKey},
} as CreateIssueFields;

Expand All @@ -160,7 +161,9 @@ export default class CreateIssueForm extends React.PureComponent<Props, State> {

handleIssueTypeChange = (_: string, issueType: string) => {
let fields = {
...this.state.fields,
summary: this.state.fields.summary,
description: this.state.fields.description,
project: {key: this.state.projectKey},
issuetype: {id: issueType},
} as CreateIssueFields;

Expand Down
1 change: 1 addition & 0 deletions webapp/src/types/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export type AllProjectMetadata = {

export type CreateIssueFields = {
description: string;
summary?: string;
project: {key: string};
issuetype: {id: string};
} & {[key: string]: JiraField};