Skip to content

More textual condition rule operators #12135

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

Merged

Conversation

brandonkelly
Copy link
Member

Description

Adds “has a value” and “is empty” operators to all text, number, and date range condition rules.

Related issues

@brandonkelly brandonkelly requested review from benjamindavid and a team as code owners October 17, 2022 11:54
@linear
Copy link

linear bot commented Oct 17, 2022

DEV-653 More textual condition rule operators

  • has a value
  • is empty
  • equals
  • begins with
  • ends with
  • contains

@brandonkelly brandonkelly changed the base branch from develop to 4.3 October 17, 2022 11:54
@brandonkelly brandonkelly merged commit f668710 into 4.3 Oct 17, 2022
@brandonkelly brandonkelly deleted the feature/dev-653-more-textual-condition-rule-operators branch October 17, 2022 12:16
@michaelrog
Copy link

Is it possible that this implementation might yield some weird corner cases, since the PHP parts of the implementation (matchValue() etc.) are matching on truthy/falsy values, whereas the database parts are filtering on the presence of any value?

e.g. What happens if a text field has the value "0"? Querying not :empty: should probably still return such a record, but matchValue() would fail to match it...?

@brandonkelly
Copy link
Member Author

@michaelrog PHP considers 0 to be “empty” (empty(0) === true) so I’m not sure if there’s a clear expected behavior there.

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.

2 participants