gristlabs_grist-core/app
Cyprien P 4b54c7d99b (core) Fix column and view fields mismatch in filters
Summary:
The problem manifested while filtering by a column, closing the filter
would change the set of rows visible on the table. This would happen
only for rare table.

What caused that problem was that the filter being edited was wrongly
applyed also to another column, so depending on the content of the
column, it would entail unexpected behaviour.

The cause of that wrong association, was a mistakingly comparing the
id of two different type of thing: column and view field. The problem
would manifest if in the same section there were a view fields with
same row id as the column being filtered.

What made that confusion possible is the `.fieldOrColumn:
ViewFieldRec|ColumnRec` property of the FileInfo object, which could
hold either a view fields or a column record and was initialized with
view fields or columns if view fields was not found (ie: hidden
column).

Solution was to make sure FieldInfo is initialized with ColumnRec
alwasy (even for hidden column).

I'm not sure what is the reason why FilterInfo needed to support both
column record and view field record in the past, but it looks like
this is not needed anymore.

As a followup commit I think it would be worth the effort to refactor
FileInfo to accept only ColumnRec.

Test Plan: Includes new regression test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3463
2022-06-07 10:26:15 +02:00
..
client (core) Fix column and view fields mismatch in filters 2022-06-07 10:26:15 +02:00
common (core) limit retries of uploads to external store in tests 2022-06-06 16:19:41 -04:00
gen-server (core) deal with SQLITE_BUSY: database is locked during tests 2022-06-03 15:51:59 -04:00
plugin (core) Update Plugin API documentation 2022-05-24 17:27:34 -07:00
server (core) limit retries of uploads to external store in tests 2022-06-06 16:19:41 -04:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00