Skip to content

Commit

Permalink
EPMRPP-88584 || Issue is not posted and error is shown for the 'Weigh…
Browse files Browse the repository at this point in the history
…t' field in integration
  • Loading branch information
Vadim73i committed Dec 8, 2023
1 parent 15d5f4c commit 40b9365
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 40b9365

Please sign in to comment.