[MGNLFORM-395] Next step conditions not working for Multiple select fields Created: 14/Sep/23  Updated: 18/Sep/23

Status: Open
Project: Magnolia Form Module
Component/s: None
Affects Version/s: 2.7.8
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive my-decorator-module.zip     File website.quizzShow.yaml    
Issue Links:
Problem/Incident
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: AuthorX Support
Team: AuthorX

 Description   

Issue description

When you have a form, which contains two different selection components and one of them has the "Multiple (select field only)" enabled, when you create a conditional step with all "AND" options (even for the multiple conditional field) then it is not properly resolved.

When a combination of OR AND or NOT operations are used, the conditional step works but when you use "AND" operation on a multi select field, it is not properly resolved.

Steps to reproduce

  1.  Download the decoration my-decorator-module.zip and paste it at your light modules folder (
    /light-modules/my-decorator-module/decorations/mtk2/templates/pages
    or include at basic page template definition the form component:
    /mtk2/templates/pages/basic.yaml
     areas:
      main:
        availableComponents:
          form:
            id: form:components/form
  2.  Go to Pages-app and import the website.quizzShow.yaml file
  3. The structure is a parent quiz page with several children (pageA, pageB, pageC and pageD) that are the landing page depending on which options are selected on the quiz parent page form
  4. The form consists on two selection fields: optionA and optionC. The optionA is a multi select field with two options: optionA and optionB. The optionC field has only one option: optionC
  5. The logic applied at the conditional steps is:
    • If optionA OR optionB are selected and NOT optionC -> go to pageA
    • If optionA AND optionB are selected and nOT optionC -> go to PageB
    • If NOT optionA NOT optionB AND optionC is selected -> go to pageC
    • If optionA AND optionC are selected -> go to pageD
    • If optionB AND optionC are selected -> go to pageD
    • If optionA AND optionB AND optionC are selected -> go to pageD

Expected results

When a multi select field has all its options selected (AND operator), the conditional step is properly resolved
 

Actual results

When a field has multi select options on its field, the OR operator is properly resolved but the AND operator is not

Workaround

Do not use multi select option for the fields and implement 1:1 relation -> 1 field : 1 option

Development notes

N/A


Generated at Mon Feb 12 05:39:46 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.