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 vote

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 https://confluence.atlassian.com/display/JIRA/Searching+for+Issues

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

1,004 views 3 12
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