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

resetValueIf doesn't work correctly if it is used in a cycle #7028

Closed
andrewtelnov opened this issue Sep 27, 2023 · 0 comments
Closed

resetValueIf doesn't work correctly if it is used in a cycle #7028

andrewtelnov opened this issue Sep 27, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@andrewtelnov
Copy link
Member

The following JSON doesn't work correctly:

{
    elements: [{
      "name": "dog",
      "type": "checkbox",
      "resetValueIf": "{none} notempty",
      "choices": ["dog"]
    },
    {
      "name": "cat",
      "type": "checkbox",
      "resetValueIf": "{none} notempty",
      "choices": ["cat"]
    },
    {
      "name": "none",
      "type": "checkbox",
      "resetValueIf": "{dog} notempty or {cat} notempty",
      "choices": ["none"]
    }] }

If "dog" and "cat" checkboxes are set then on setting "none" checkbox "dog" checkbox is unset, but it triggers to unset the "none" checkbox.
The correct behavior is to unset "dog" and "cat" checkboxes and do not touch "none" checkbox.

@andrewtelnov andrewtelnov self-assigned this Sep 27, 2023
@andrewtelnov andrewtelnov added this to the v1.9.111 milestone Sep 27, 2023
@RomanTsukanov RomanTsukanov changed the title resetValueIf doesn't work correctly if there is a cycle of using it resetValueIf doesn't work correctly if it is used in a cycle Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant