-
Notifications
You must be signed in to change notification settings - Fork 80
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 a migration to remove _id from filter items #3490
Conversation
describe('migration remove-_id-from-filter-items', () => { | ||
beforeEach(async () => { | ||
spyOn(process.stdout, 'write'); | ||
await testingDB.clearAllAndLoad(fixtures); |
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.
The migration looks good, and I believe it works as expected.
Still, I am concerned that the fixtures only show a single scenario: "A collection whose settings have filters, and those filters have nested items with _id present".
There are many other scenarios that need to be tested that they are not affected:
- Collections that don't have filters
- Collections that have filters and don't have nested items
- Collections that have filters with nested items and no _id present in there.
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.
I have added a few test cases as suggested, you can check them out when you get time
While this migration may be needed, the fact that we have no clue as how to those _id's appeared there may leave us having to re-run an identical migration if this condition happens again. Please, spend some time trying to learn how this condition appeared in the first place, in order to first fix the problem, and only then run the migration. |
I have tried creating new filters and grouped filters, both do not add |
fixes #3485
PR checklist:
QA checklist: