Is it possible to define variable values in JQL

Hello - I have a requirement to create a customized Filter / Dashboard and I should be able to generate the Defects by Project & by Release & per week / per month. I have multiple projects and Releases almost every week. So, I cannot update the same filters each time with different dates.

is it possible in JIRA to define a particular filter with a Variable value and every time I want to refresh my dashboard, I am prompted with a popup or dropdown asking to enter the Start and End Dates or Month and Year?

2 answers

Hey J V,

This feature is currently not available by default. You can introduce some parameters in your JQL, f.e. search with current assignee, but this method is not very flexible. You can always do some custom development with the rest API to make your JQL parameters parameterizable:

Another option is to tweak the URL used by JIRA:

The part after jql= is the actual query. To construct this url you can for instance do the following in javascript:

<script type="text/javascript">
	baseURL = document.location.origin + document.location.pathname + '?jql=';
	query = 'project = test AND assignee = jira';

	fullURL = baseURL + encodeURI(query); // This is the url you can use to redirect

The parameters for the query (project and assignee) can be asked from the user via an input box.

Hope this helps?!

Hello Benji,

Appreciate your quick response. Unfortunately, I am in Testing team and do not have the privileges to make any changes to the API's. Even if I want to suggest this solution to my Config team, I might endup with an answer that this will impact all the projects across the organization and they wouldn't want to make such changes.

However, it would be great if Atlassian can make such ENhancements in Future.


See answer here about using a filter and a condition on other filters. This enables one filter to contain the date condition which can be used by multiple other filters.

This is not quite what you wanted but does enable simpler setting of a date range (or the like) for a number of filters which could be used on your dashboard.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,086 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you