Parameters or variables in JQL stored in a dashboard
Asked by Paul Thompson:

I have dashboards that display the current status of various deliverables and metrics per quarter in a year (bugs logged, epics completed, etc). Every quarter, I need to copy and tweak a bunch of jql filters and then copy and tweak the dashboard to use the tweaked jql filters. It is very tedious.

What I would like is a way to store some parameters or variables in a dashboard and apply those parameters to every filter on the dashboard. Then I could just copy the dashboard, tweak the parameters and all my widgets get updated. Is that possible?


Answers:
author: Danut M _StonikByte_
body: Hi [@Paul Thompson](/t5/user/viewprofilepage/user-id/5539816),

An easier way could be to use a gadget that offers these statistics and can group data by quarter automatically.

The **Pivot Table \& Pivot Chart gadget** offered by our [Great Gadgets](https://marketplace.atlassian.com/search?query=stonikbyte%20great%20gadgets%20agile) allows you to create multi-dimensional stats (by multiple fields) by count, sum of a field, percentages, etc and it can group data by quarter.

The info can be displayed in various ways. Here is just a simple example.

As **table**:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/334659i998B2519FE543276/image-size/large?v=v2&px=999 "image.png")

As **heat-map table**

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/334666iE9F9414EF9AB33E9/image-size/large?v=v2&px=999 "image.png")

As **chart** (of various types)

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/334664i8DC64DC5DE053E9E/image-size/large?v=v2&px=999 "image.png")

See more examples of this gadget (and the many others offered by the same app) in these articles:

* <https://community.atlassian.com/t5/App-Central/An-effective-dashboard-for-Service-Desk-and-Customer-Support/ba-p/2360369>
* <https://community.atlassian.com/t5/Jira-articles/Building-a-powerful-Kanban-dashboard-in-Jira-with-Great-Gadgets/ba-p/1664331>

You can start with an **1 month free trial**. If you need any help, feel free to contact us at support@stonikbyte.com.

Hope this helps.

Danut.


author: Bill Sheboy
body: Hi [@Paul Thompson](/t5/user/viewprofilepage/user-id/5539816) -- Welcome to the Atlassian Community!

Short answer: that is not possible with built-in dashboards, but there are several possible workarounds.

Some possible workarounds are:

1. use a marketplace addon / dashboard
2. use chained, saved filters
3. use automation rules to dynamically update the saved filters

For #1, you could check the Atlassian Marketplace to find other dashboard gadgets, or dashboard replacements, that can do that. <https://marketplace.atlassian.com/>

For #2, you could save a base filter which has your timeframe, or other parameters, and have the others filters build on that.

For example, one saved filter could be this:

```
project = myReportingProject AND reportingQuarter = "2024Q2"
```

After that filter is saved, you may find its id by looking in the browser URL. For example:

```
myJiraURL/issues/?filter=10035
```

Then any saved filters in the dashboard could refer to that first filter. For example, this one adds a check of status category to the filter

```
filter=10035 AND statusCategory = Done
```

Later, only the first filter needs to change to update the other ones used in the dashboard.

Similarly, the date functions could be used for more dynamic filtering, such as with startOfMonth(): <https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#startOfMonth-->

For #3, automation rules can run on a scheduled trigger. With that, a rule could call the REST API endpoint using the Send Web Request action to edit a saved filter on a schedule, changing the JQL. An example of this scenario is to dynamically change the sprints included in filters for a dashboard.

Kind regards,  
Bill

comments: author: Paul Thompson
body: Thanks Bill, I'll give those a try.


Tags: cloud

jira-cloud