Skip to content

Execute step (not) applicable action on all steps#6114

Merged
sergei-maertens merged 2 commits intomainfrom
chore/6099-execute-step-(not)-applicable-action-on-all-steps
Mar 27, 2026
Merged

Execute step (not) applicable action on all steps#6114
sergei-maertens merged 2 commits intomainfrom
chore/6099-execute-step-(not)-applicable-action-on-all-steps

Conversation

@viktorvanwijk
Copy link
Copy Markdown
Contributor

@viktorvanwijk viktorvanwijk commented Mar 25, 2026

Closes #6099

[skip: e2e]

Changes

  • Ensured rules with a step (not) applicable action are executed on all steps
  • Added a specific message in the admin rule overview when a logic rule will be executed on all steps

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Checked new model fields are usable in the admin
    • Problem detection in the admin email digest is handled
  • Dockerfile/scripts

    • Updated the Dockerfile with the necessary scripts from the ./bin folder
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how
  • Documentation

    • Added documentation which describes the changes

…ted on all steps

The fix for #5996, where we execute this rule from the first determined step, only solves part of the problem.
For example: if a user submits a certain step, causing a future step to be not applicable, but then navigates
back to a step before the step with the not applicable action -> the not applicable step will be marked as
applicable again in the progress indicator, because the rule is never executed.

To fix this, we execute rules with a step (not) applicable action on all steps. With the logic evaluation in
the frontend, performance should not suffer much, because these rules are executed almost instantly.

An alternative solution where we create submission steps upon submission creation, and persist the "is_applicable"
flag to the database, is still tricky (but not impossible) for the reason described in #6035. If it turns out the
solution implemented here was the wrong one, we can decide to switch to this alternative solution anyway.

I do realize something while writing this, actually. The logic rules will be ordered based on input/output variable
dependencies. If there is none, the step order will be used. Because we execute these rules on all steps now, they
might show up near the beginning of the logic rule list, even when the action applies to a later step. I guess we
have to see how will look exactly, and if form designers experience confusion with this.
Now that rules with a step (not) applicable action will be executed on all steps, it makes sense to include a special message instead of listing all the step names.
@viktorvanwijk viktorvanwijk force-pushed the chore/6099-execute-step-(not)-applicable-action-on-all-steps branch from 9419269 to 7d36e1d Compare March 25, 2026 10:28
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.07%. Comparing base (101ffb2) to head (7d36e1d).
⚠️ Report is 38 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6114      +/-   ##
==========================================
- Coverage   97.09%   97.07%   -0.02%     
==========================================
  Files         883      883              
  Lines       33189    33210      +21     
  Branches     2972     2975       +3     
==========================================
+ Hits        32225    32239      +14     
- Misses        648      655       +7     
  Partials      316      316              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sergei-maertens sergei-maertens merged commit 6634efb into main Mar 27, 2026
29 of 31 checks passed
@sergei-maertens sergei-maertens deleted the chore/6099-execute-step-(not)-applicable-action-on-all-steps branch March 27, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test edge cases with new logic evaluation

2 participants