Skip to content
Snippets Groups Projects

REDMINE_ISSUE-18259 | Non-affichage du champ conditionnel avec la liste à choix multiples

Merged REDMINE_ISSUE-18259 | Non-affichage du champ conditionnel avec la liste à choix multiples
Merged Timothee P requested to merge redmine-issues/18259 into develop
1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
+ 6
2
@@ -203,8 +203,12 @@ export function isXtraFormActive(extraForms, config) { // return true if no conf
// get the customForm which activates conditional field
const conditioningXForm = extraForms.find((xForm) => xForm.name === conditionField);
// check if its value match the condition value
if (conditioningXForm) { // use JSON.stringify() to compare arrays (works with other field type too)
return JSON.stringify(conditioningXForm.value) === JSON.stringify(conditionValue);
if (conditioningXForm) {
if (Array.isArray(conditionValue) && conditioningXForm.value) {
return conditioningXForm.value.some((value) => conditionValue.includes(value));
} else {
return conditioningXForm.value === conditionValue;
}
}
}
return true;
Loading