Review main Abandoned Breaking

65706[!!!][BUGFIX] Search: Consider the columns' visibility by record type

Daniel Windloff CR 0 V 0 Expert +1799 −294 updated 11/04/21, 13:04

Commit message

The purpose was to get rid of one of the remaining plain SQL
occurrences in the `getQueryBuilder` in `DatabaseRecordList`.
That is the prerequisite to introduce the current table in all SQL
statements in that method.
That in turn is a basis for bugfixes in the sorting area, because they
need to join tables. Therefore, the columns' config `search`.`andWhere`
has been removed.

The point of the `andWhere` configuration was to add a possibility to
hide columns in the search, if they are not visible in a record type.
When evaluating that approach it turns out, that it works only
theoretically. In practice, for every column, that is in the search
field list, must be checked if it is visible in every type of the
record. If not, the `andWhere` configuration should have been added.
The result of the former approach are a bunch of miss configurations
in the tca.
In the search results columns were accidentally considered or
accidentally not considered.

That's why the visibility of a search column should be determined
based on the `type` configuration.
As the types configuration holds a bunch of options, only the most
frequent used ones, the `type` configuration itself and
`subtypes_addlist` configuration, are taken into account.
To add conditions for other display related configurations, the
hook should be used.

As the search in the DatabaseRecordList is used as a detail view of the
live search, the live search must be considered as well.
To add a source for the conditions of both searches, the
calculation of the search condition has been moved to a service class.
Both searches (Live search and the search in the DatabaseRecordList)
use this class to add the needed conditions.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 3

Files 14