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

This widget could not be displayed.

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.


This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

128 views 2 0
Join discussion

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