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

fix(editor): Fix Multi option parameter expression when the value is an array #12430

Conversation

ShireenMissi
Copy link
Contributor

@ShireenMissi ShireenMissi commented Jan 2, 2025

Summary

In multi option parameters, the array is an acceptable value for expressions
This PR:

  • Fixes a regression where the expression was converted to a string causing the FE validation to fail and reject arrays
  • Fixes a bug when switching from fixed to expression, the value was surrounded by {{}} which made the expression invalid.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-1535/multi-options-component-dont-show-error-when-using-array-in-expression

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@ShireenMissi ShireenMissi marked this pull request as draft January 2, 2025 12:42
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Jan 2, 2025
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ckages/editor-ui/src/components/ParameterInput.vue 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ShireenMissi ShireenMissi marked this pull request as ready for review January 2, 2025 15:06
@michael-radency
Copy link
Contributor

@ShireenMissi I would say this change should be scoped to multi-options input, now it would affect all inputs, that could cause some regressions

@ShireenMissi ShireenMissi force-pushed the node-1535-multi-options-component-dont-show-error-when-using-array-in-expression branch from ec14da6 to f5ad7d1 Compare January 3, 2025 14:45
@ShireenMissi ShireenMissi added the tests-needed This PR needs additional tests label Jan 3, 2025
Copy link
Contributor

github-actions bot commented Jan 3, 2025

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Jan 3, 2025

n8n    Run #8577

Run Properties:  status check passed Passed #8577  •  git commit 7952f9c6b4: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ShireenMissi 🗃️ e2e/*
Project n8n
Branch Review node-1535-multi-options-component-dont-show-error-when-using-array-in-expression
Run status status check passed Passed #8577
Run duration 04m 51s
Commit git commit 7952f9c6b4: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ShireenMissi 🗃️ e2e/*
Committer Shireen Missi
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 484
View all changes introduced in this branch ↗︎

@ShireenMissi ShireenMissi force-pushed the node-1535-multi-options-component-dont-show-error-when-using-array-in-expression branch from 4d4dbaa to 7952f9c Compare January 3, 2025 16:47
Copy link
Contributor

github-actions bot commented Jan 6, 2025

✅ All Cypress E2E specs passed

@ShireenMissi ShireenMissi merged commit 452a7bf into master Jan 6, 2025
37 checks passed
@ShireenMissi ShireenMissi deleted the node-1535-multi-options-component-dont-show-error-when-using-array-in-expression branch January 6, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team tests-needed This PR needs additional tests ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants