Skip to content

Add support for explicitly choosing an aggregator in Query Builder #4620

Description

@grantfitzsimmons

The feature request "Add support for explicitly choosing a formatter in Query Builder" (#1959) did not cover choosing an aggregator.

@maxpatiiuk said in this comment that at one point it was

Fixed both for formatters and aggregators

This code conditionally renders a QueryFieldFormatter component based on the fieldMeta properties. If fieldType is either 'formatter' or 'aggregator' and tableName is a string, it displays the QueryFieldFormatter component with specific props like formatter, tableName, type, and onChange.

Theoretically it already should support this for aggregators, but either due to a bug in the existing code or an oversight, this is not functional at the moment.

This indicates to me that the intention was to have this existing feature request cover aggregators as well (as the logic should be nearly identical).

Expected Behavior

  • When adding an (aggregated) line to a query, the user should be able to explicitly define which aggregation to use
  • The gear icon should only appear to the right of the (aggregated) line if there are two or more aggregators configured for that table
  • This should behave identically to how the user defines an explicit formatter (added back in Add support for explicitly choose a formatter in QB #4615)

This is arguably a bug in the existing implementation, but because it is not functional and outside the scope of the previous issue, I have opened this one. I do see this as one and the same as #1959 at its core.

Metadata

Metadata

Assignees

Labels

1 - RequestA request made by a member of the community2 - QueriesIssues that are related to the query builder or queries in general

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions