diff --git a/app/src/components/fields/dynamicFieldsSection/fields/autocompleteField.jsx b/app/src/components/fields/dynamicFieldsSection/fields/autocompleteField.jsx index 5c09a046d3..0b1ab99cab 100644 --- a/app/src/components/fields/dynamicFieldsSection/fields/autocompleteField.jsx +++ b/app/src/components/fields/dynamicFieldsSection/fields/autocompleteField.jsx @@ -31,7 +31,7 @@ export const AutocompleteField = ({ field, darkView, integrationInfo, ...rest }) const getRequestParams = (term) => ({ method: 'PUT', data: { term } }); - const parseValueToString = (user) => (user ? user.name : ''); + const parseValueToString = (value) => (value ? value.name : ''); const stateReducer = (state, changes) => { if (typeof changes.selectedItem === 'string') { @@ -62,7 +62,6 @@ export const AutocompleteField = ({ field, darkView, integrationInfo, ...rest }) }; AutocompleteField.propTypes = { field: PropTypes.object.isRequired, - defaultOptionValueKey: PropTypes.string.isRequired, darkView: PropTypes.bool, integrationInfo: PropTypes.object, }; diff --git a/app/src/pages/inside/stepPage/modals/postIssueModal/postIssueModal.jsx b/app/src/pages/inside/stepPage/modals/postIssueModal/postIssueModal.jsx index 044ff1b559..04d89fefc2 100644 --- a/app/src/pages/inside/stepPage/modals/postIssueModal/postIssueModal.jsx +++ b/app/src/pages/inside/stepPage/modals/postIssueModal/postIssueModal.jsx @@ -285,7 +285,10 @@ export class PostIssueModal extends Component { field.fieldType === MULTIPLE_AUTOCOMPLETE_TYPE || field.fieldType === CREATABLE_MULTIPLE_AUTOCOMPLETE_TYPE; const formFieldData = formData[field.id]; - const preparedFormFieldData = Array.isArray(formFieldData) ? formFieldData : [formFieldData]; + let preparedFormFieldData = formFieldData; + if (!Array.isArray(formFieldData)) { + preparedFormFieldData = formFieldData ? [formFieldData] : []; + } return { ...field, [isAutocomplete ? 'namedValue' : 'value']: preparedFormFieldData }; }); const backLinks = items.reduce(