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

Automation conditions are not working with booleans when using JavaScript. #13703

Open
1 task done
melohagan opened this issue May 16, 2024 · 1 comment
Open
1 task done
Labels
bb-automations Budibase Automations related work bug Something isn't working env - production Bug found in production firestorm Data/Infra/Revenue Team High priority Created by Linear-GitHub Sync javascript Relating to user JavaScript in the builder

Comments

@melohagan
Copy link
Collaborator

melohagan commented May 16, 2024

Checklist

  • I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Cloud
    • Tenant ID: plugins.budibase.app

Describe the bug
Automation conditions are not working with booleans when using JavaScript.

To Reproduce
Steps to reproduce the behavior:

  1. Add an automation with a conditional block
  2. Add a javascript binding to the reference, that returns true or false on a condition
  3. Add a javascript binding to the value comparison of simply return true
  4. Run some tests - see that the condition never passes
  5. Now replace true with "true" (stringify) and do the same for false.
  6. The condition can now pass.

Expected behavior
When using the conditional block in automations, comparing booleans should work, e.g. true === true and I should not have to stringify these values.

Additional context
It could also be nice to expand the number of conditional options:
Screenshot 2024-05-16 at 13 27 05

I had to use JavaScript for the includes function, but would be nice if Contains was a conditional option, then the JS wouldn't have been needed in the first place.

@melohagan melohagan added bug Something isn't working bb-automations Budibase Automations related work javascript Relating to user JavaScript in the builder High priority Created by Linear-GitHub Sync labels May 16, 2024
Copy link

linear bot commented May 16, 2024

@ConorWebb96 ConorWebb96 added env - production Bug found in production firestorm Data/Infra/Revenue Team labels May 22, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bb-automations Budibase Automations related work bug Something isn't working env - production Bug found in production firestorm Data/Infra/Revenue Team High priority Created by Linear-GitHub Sync javascript Relating to user JavaScript in the builder
Projects
None yet
Development

No branches or pull requests

2 participants