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

fix(filters): don't use indexOf with NOT_IN_CONTAINS #262

Merged
merged 1 commit into from Feb 10, 2021

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Feb 10, 2021

  • using indexOf returns true whenever the substring is found within a string and that could cause issue, for example "Task1" will be found in "Task123" but that shouldn't be accepted
  • also enforce the fact that IN_CONTAINS and NOT_IN_CONTAINS only works with CSV string "Task 1,Task2"

- using indexOf returns true whenever the substring is found within a string and that could cause issue, for example "Task1" will be found in "Task123" but that shouldn't be accepted
@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #262 (1b393b8) into master (4b8460c) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #262   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          208       208           
  Lines        12000     12018   +18     
  Branches      4122      4130    +8     
=========================================
+ Hits         12000     12018   +18     
Impacted Files Coverage Δ
packages/common/src/enums/operatorType.enum.ts 100.00% <ø> (ø)
...on/src/filter-conditions/executeMappedCondition.ts 100.00% <100.00%> (ø)
...es/common/src/filter-conditions/filterUtilities.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b8460c...1b393b8. Read the comment docs.

@ghiscoding ghiscoding merged commit 310be30 into master Feb 10, 2021
@ghiscoding ghiscoding deleted the bugfix/filter-in-contains branch February 10, 2021 13:52
@ghiscoding ghiscoding changed the title fix(filters): don't use indexOf NOT_IN_CONTAINS fix(filters): don't use indexOf with NOT_IN_CONTAINS Feb 10, 2021
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.

None yet

1 participant