-
Notifications
You must be signed in to change notification settings - Fork 3
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
adds components dropdown and contains not operator #1439
Conversation
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.
@@ -63,6 +63,11 @@ const makeAdvancedSearchWhereFilters = (filters) => | |||
} | |||
} | |||
let whereString = `${field}: { ${gqlOperator}: ${value} }`; | |||
// If we would like to return results that do not contain a particular string ('_nilike'), we should return null values as well | |||
if (gqlOperator.includes("_nilike")) { | |||
const whereStringWithNullValues = `_or: [ { ${whereString} }, { ${field}: { ${`_is_null`}: true } }]`; |
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.
nice touch 👌
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.
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.
looks and works great! i noticed what chia pointed out too but im approving on the assumption that you meant to write "is blank" and "is not blank" in the test instructions since adding is and is not isn't in the issue requirements
oops sorry @chiaberry, i meant to check one of the other fields that has 'is' and 'is not' options (such as 'type') since this pr also corrects an issue where records with null values were not being returned under the 'is not' condition. made a correction in the instructions - thanks for catching that! |
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.
Thanks for the clarification Tilly! I tested with Lead is not COA ATD and got all the results, whereas in staging you only get 179 results
🚢 🚢
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.
Such an improvement! I tested using every type of field search (date, string, string that is a concatenated list, and number) and all operators with and without dropdown options, and I see this working exactly as expected. 🚢 🚀 🙌
@@ -63,6 +63,11 @@ const makeAdvancedSearchWhereFilters = (filters) => | |||
} | |||
} | |||
let whereString = `${field}: { ${gqlOperator}: ${value} }`; | |||
// If we would like to return results that do not contain a particular string ('_nilike'), we should return null values as well | |||
if (gqlOperator.includes("_nilike")) { | |||
const whereStringWithNullValues = `_or: [ { ${whereString} }, { ${field}: { ${`_is_null`}: true } }]`; |
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.
thanks y'all! gonna go ahead and merge this one :) |
Associated issues
fixes cityofaustin/atd-data-tech#19052
Testing
URL to test:
https://deploy-preview-1439--atd-moped-main.netlify.app/
Steps to test:
Ship list