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

AutoFilter Improvements #2393

Merged
merged 5 commits into from
Nov 16, 2021
Merged

AutoFilter Improvements #2393

merged 5 commits into from
Nov 16, 2021

Conversation

oleibman
Copy link
Collaborator

@oleibman oleibman commented Nov 11, 2021

Fix #2378. The following changes are made:

  • NotEqual tests must be part of a custom filter. Documentation has been changed to indicate that.
  • Method setAndOr was replaced by setJoin some time ago. Documentation now reflects that change.
  • Documentation to indicate that string filters are not case-sensitive, same as in Excel.
  • Filters testing against numeric value now include a numeric test (not numeric for not equal, numeric for all others).
  • String filter had previously treated everything as a test for "equal". It now handles "not equal" and the variants of "greater/less" with or without "equal".
  • Documentation correctly stated that no more than 2 rules are allowed in a custom filter. Code did not enforce this restriction. It now does, throwing an exception if an attempt is made to add a third rule.
  • Deleted a lot of comments in Rule.php to make it easier to see what is not yet implemented (between, begins with, etc.). I may take these on in future.
  • Added a number of tests for the new functionality.

This is:

- [x] a bugfix
- [ ] a new feature

Checklist:

Why this change is needed?

Fix issue PHPOffice#2378. The following changes are made:
- NotEqual tests must be part of a custom filter. Documentation has been changed to indicate that.
- Method setAndOr was replaced by setJoin some time ago. Documentation now reflects that change.
- Documentation to indicate that string filters are not case-sensitive, same as in Excel.
- Filters testing against numeric value now include a numeric test (not numeric for not equal, numeric for all others).
- String filter had previously treated everything as a test for "equal". It now handles "not equal" and the variants of "greater/less" with or without "equal".
- Documentation correctly stated that no more than 2 rules are allowed in a custom filter. Code did not enforce this restriction. It now does, throwing an exception if an attempt is made to add a third rule.
- Deleted a lot of comments in Rule.php to make it easier to see what is not yet implemented (between, begins with, etc.). I may take these on in future.
- Added a number of tests for the new functionality.
Let's see if this change suffices.
Not sure how to convince it. Let's try this.
Figured out the problem on my local machine. Expect this to work.
@oleibman oleibman mentioned this pull request Nov 11, 2021
5 tasks
@oleibman oleibman merged commit 2a12587 into PHPOffice:master Nov 16, 2021
@oleibman oleibman deleted the issue2378b branch February 6, 2022 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

AUTOFILTER_COLUMN_RULE_NOTEQUAL is actual showing EQUAL
1 participant