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

Add NOT_EQUAL operator for StringOperatorType #6585

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

VincentLanglet
Copy link
Member

Subject

I am targeting this branch, because BC. This is a new feature.
There is contains and not contains operator, but only the equal operator.

Changelog

### Added
- `NOT_EQUAL` operator for `StringOperatorType`

@peter-gribanov
Copy link
Contributor

Maybe you should add localization?

@VincentLanglet
Copy link
Member Author

Maybe you should add localization?

The key already exists, from the equalOperatorType

@peter-gribanov
Copy link
Contributor

The key already exists, from the equalOperatorType

Sorry. I didn't notice.

core23
core23 previously approved these changes Nov 11, 2020
@VincentLanglet VincentLanglet requested a review from a team November 11, 2020 10:58
phansys
phansys previously approved these changes Nov 11, 2020
Copy link
Member

@phansys phansys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, we should add an upgrade note with this change.

@VincentLanglet
Copy link
Member Author

IMO, we should add an upgrade note with this change.

With what kind of message ?

@phansys
Copy link
Member

phansys commented Nov 11, 2020

With what kind of message ?

I think something like this could work:

Added "Not equal" in the default list for "choices" option at Sonata\AdminBundle\Form\Type\Operator\StringOperatorType, in order to allow filtering by strings that are not equal to the model data.

@VincentLanglet
Copy link
Member Author

With what kind of message ?

I think something like this could work:

Added "Not equal" in the default list for "choices" option at Sonata\AdminBundle\Form\Type\Operator\StringOperatorType, in order to allow filtering by strings that are not equal to the model data.

Then I think the same as sonata-project/SonataDoctrineORMAdminBundle#1196 (comment)
This seems enough in Changelog to me.

New features are not added to the Upgrade-x files.
Generally it's more deprecation, because the user has to do something to avoid them.

@phansys
Copy link
Member

phansys commented Nov 12, 2020

New features are not added to the Upgrade-x files.

I agree with this premise, in cases where the new feature does not affect the previous behavior without an explicit user's intervention (by adding a new argument, a method call, by setting some service configuration, etc.). Even if a new choice in a dropdown could be considered a slight change, I think it is changing the previous behavior (it's adding a new option in an existing dropdown and allowing end users to filter using a new operator).
Obviously, we could set our "threshold" between what deserves an upgrade note and what doesn't.

@phansys phansys requested a review from core23 November 12, 2020 11:58
@VincentLanglet VincentLanglet merged commit 536005a into sonata-project:3.x Nov 12, 2020
@VincentLanglet VincentLanglet deleted the feature/notEqual branch November 12, 2020 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants