Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIO-8389 | FIO-8403 | FIO-8414: Fixes 4.x validations and conditionals for array data components #5638

Open
wants to merge 4 commits into
base: 4.19.x
Choose a base branch
from

Conversation

mikekotikov
Copy link
Contributor

@mikekotikov mikekotikov commented Jun 7, 2024

!!! PR for 4.19.x branch, there's a separate for 5.x branch

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8389
https://formio.atlassian.net/browse/FIO-8403
https://formio.atlassian.net/browse/FIO-8414

Description

What changed?

Previously, formio.js conditionals were failing with error / not working in scenarios when conditions were applied to array data structure components (Edit Grid, Data Grid, etc.). This PR fixes this behavior.

Why have you chosen this solution?

Tried different solutions, but since this logic never really worked fine, ended up writing a recursive function that would generate array of components paths with indexes, which are later iterated one by one to perform conditional checks.

Dependencies

None

How has this PR been tested?

I added automated tests to cover both tickets cases, also performed a good batch of manual tests through portal

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

@mikekotikov mikekotikov changed the title FIO-8389 | FIO-8403: Fixes 4.x 'Is Empty' and 'Is Not Empty' conditionals applied to array data structure components FIO-8389 | FIO-8403 | FIO-8414: Fixes 4.x validations and conditionals for array data components Jun 14, 2024
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.

None yet

1 participant