Add support for variables in GLQL
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
In order to have GLQL-powered dashboards, we need to be able to inject some external filters in the GLQL query.
Dashboards can have their own filters (e.g. datetime range or project selector), which are then passed down to the panels to be able to fetch filtered data appropriately. Filters could be generic at dashboard level, or specific at panel level.
For instance, imagine a dashboard with 2 panels, one for merged MRs and one for closed issues, controlled by the same page-wide date filter. In the MR panels, you would want to query merged < DATE, while on the issues panel you would want to query closed < DATE.
I thought variables could be a flexible way to handle this scenario (but there might be other ways too?)
For instance,
query:
project = $PROJECT and
type = MergeRequest and
merged <= $MERGED_DATE
variables:
MERGED_DATE = foo
PROJECT: bar
where MERGED_DATE and PROJECT would then be set appropriately by the dashboard environment.