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

Always persist boolean properties with a default value #91

Open
marstamm opened this issue Apr 25, 2024 · 0 comments
Open

Always persist boolean properties with a default value #91

marstamm opened this issue Apr 25, 2024 · 0 comments
Labels
backlog Queued in backlog enhancement New feature or request

Comments

@marstamm
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

When I have a template with a Boolean field, it persists as '' (empty string) when I apply it. Only after I select and unselect it is false persisted.

This leads to inconsistent behavior when I use the property in a condition, like

      "condition": {
        "property": "myBooleanProp",
        "equals": false
      }

Describe the solution you'd like

When first applying a Boolean property, assume a default value of false if none is given.

Describe alternatives you've considered

  • Require an explicit default value of false
  • Do type casting when evaluating conditions ('' == false)

Additional context

Discovered in #84 (comment)

@marstamm marstamm added the enhancement New feature or request label Apr 25, 2024
@philippfromme philippfromme added the backlog Queued in backlog label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants