Parameters in Queries

I am new(ish) to JIRA and I am writing queries but do not know how to input parameters. E.g. List stories created between 99/99/99 and 99/99/99 where the dates are entered at run time.

Is there way to do this?

1 answer

0 votes

There's two types of search in Jira, simple and advanced. If you go to search, you will usually be offered simple at first, look at the top left to switch to advanced.

Advanced searches are done by entering JQL (it's like SQL, but is only the "where" part of a query, and it's Jira aware rather than table aware). For example, "Project = OPS and Created > 30/10/2011 and Created < 31/12/2011" to list all issues created between 30th October 2011 and the end of the year, in project OPS

A simple query presents you with a list of parameters that you can fill in. To do the query above, you'd select OPS from the project list, then enter the two dates in the "created before" and "created after" fields.

For a lot more detail, see

Many thanks, Nic. However, what I wanted to do was to write and save a query that could be re-used. When run it would present me with the variable parameter fields so I could enter different values each time rather than writing a new query each time. Is this possible?

Queries that can be reused - yes - you can save a filter and share it, and then use it repeatedly in all sorts of places (gadgets and reports). They are of course, dynamic - if the results of a filter change then they return the currently matching items as they are "run". (Simple example - "issues created in the last 5 days")

Prompting people for specific fields, no.

It's not a particularly good model IMHO, as it discourages people from actually thinking about what they're doing. I've lost count of the number of times I've worked at places where you can do this and seen swathes of utterly useless reports. Share a filter with your users, and then tell them to change it (Jira will create a copy for them, not break your existing on) and then educate them to use the simple search - you'll soon find they are happily generating their own reports and letting you get on with real work.

Nic, thanks again. As I thought but it's saved me some time in trynig to find a way.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,704 views 17 21
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