Extend AddOnAssignedUsersFinder to allow retrieval of historical assigned users data.
Summary
After #490932 (comment 2143226228) is done we can extend the finder to retrieve historical data for given time period instead of always retrieving current data.
Proposal
- Extend the finder to retrieve historical data for assigned users when "from" and\or "to" params are passed.
- Update usages of extended finder so
AiUserMetricsandAiMetricsendpoints consider historical data when timerange filters are used. - Make sure that the finder raises an error if "from\to" is passed but no ClickHouse is available.
- If no "from\to" is passed we can rely on current state of the system and use PG only.
Edited by Pavel Shutsin