Skip to content
Snippets Groups Projects
Commit e26173c6 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

check forced value with isEqual to compare arrays for multiple selection custom fields

parent 18f051f0
No related branches found
No related tags found
2 merge requests!747REDMINE_ISSUE-19163 | Tests automatisés - Signalements non-géographiques,!746REDMINE_ISSUE-17629 | Tests automatiques (champs conditionnels)
import featureAPI from '@/services/feature-api';
import { isNil } from 'lodash';
import { isEqual, isNil } from 'lodash';
export function formatStringDate(stringDate) {
const date = new Date(stringDate);
......@@ -241,7 +241,7 @@ export function checkFieldForcedValue(field, extraForms) {
//* find the extraForm field conditioning the forced value
const conditioningField = extraForms.find((xtraForm) => xtraForm.name === config.conditionField);
//* if found check that its value match the condtionValue
if (conditioningField && conditioningField.value === config.conditionValue) {
if (conditioningField && isEqual(conditioningField.value, config.conditionValue)) {
//* set this value with the forced value and disable the form field
field.value = config.forcedValue;
field.disabled = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment