-
Notifications
You must be signed in to change notification settings - Fork 9
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
MOB-9145: support isOneOf and isNotOneOf comparator #446
MOB-9145: support isOneOf and isNotOneOf comparator #446
Conversation
This CI failed due to nested field, once this PR #445 merged, CI will be success |
@@ -362,7 +362,7 @@ class CriteriaCompletionChecker { | |||
return this.evaluateComparison( | |||
query.comparatorType, | |||
valueFromObj, | |||
query.value ? query.value : '' | |||
query.value ? query.values : '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this one slightly different than the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because in value we have single element and in values we have multiple element(s),
and when we create criteria for the isOneOf and isNotOneOf comparator we get values instead of value
@@ -374,14 +374,14 @@ class CriteriaCompletionChecker { | |||
return this.evaluateComparison( | |||
query.comparatorType, | |||
valueFromObj, | |||
query.value ? query.value : '' | |||
query.value ?? query.values ?? '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if an empty string is evaluated? should we even run the evaluation at all if value
or values
isn't present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So empty string is compared with the criteria value, empty string is not matched with value and gives result as false.
Yes, we run the evaluation.
…otOneOf-comparator
JIRA Ticket(s) if any
Description
Support isOneOf and isNotOneOf comparator
Test Steps
Video attached to the ticket, See a JIRA ticket for the video