Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I create a search query based on an attribute of a jira issue specified

Say, I have a main JIRA issue which has a particular 'Due Date'. Now I want to create an query based on that JIRA issue key. Say, the query should return JIRA issues which were updated before this due date, but as an input to the query I can give the JIRA issue key. The query should refer to the issue, fetch the 'due Date' from it and the use it. How can this be done. Thanks


Hi @Rahul_Desai

This wouldn't be a simple query - what's the use case in this instance?

You can certainly search using the due date simply - such as:

duedate <= endOfMonth()


duedate >= 2019-01-25

To refer to another issue's due date though, I'm not sure on how that would work.


Muhammad Ramzan Community Leader Jan 25, 2020

@Rahul_Desai  which version you are using cloud or server.


It looks like you want the sub query feature which is not possible without third party plugin.

Hi @Rahul_Desai

So you can achieve what you're looking for using a nestled filter, rather than a template issue - here's how to do it:

First, you need to create your due date filter, which will master this data across multiple other filters. So if I want to find all issues which have a due date of 31/01/2020, I will search:

duedate = 2020-01-31

^ Now save this filter - for example as "Due Date Master". When you save a filter, it will be given a Filter ID in the URL - looking something like this: issues/?filter=10452. Save the Filter ID, we'll need this next.

Now I can create three more queries to search for different issue types which match this due date:

issuetype = Story and filter = 10452
issuetype = Bug and filter = 10452
issuetype = Sub-task and filter = 10452

^ Notice that whilst I change the first part, the second part stays the same. This is because JQL is checking if each query meets the parameters of our master filter, i.e the due date.

This means you can change the due date in just one filter, which would update every filter using the "filter =" search parameter.

Feel free to add more to the first filter - and it'll always update any other queries using it as a search parameter.


Thanks @Stephen Wright _Elabor8_ . It solves a part of my use case. I wanted it for every release, so referring  to an jira ticket, which also is a part of that release, was what I wanted.
In your solution I'll have to make different saved filters every release. I wouldn't want to update the filter, as I want to maintain the historical data for future reference.

I'll try to think how I can do it with your approach. Thanks a lot.

@Stephen Wright _Elabor8_ , the use case in my case is I plan to have 1 JIRA issue, which has schedule information in it, say a date. Now I want my filter to fetch the date from the JIRA issue and use it in other filters. See, I have multiple filters which will be based on one attribute (say due date as in the example). If this due date changes for some reason, I do not want to change it in all my filters. I am looking for a way, where i can make change only in one place, which will be referred to in multiple places... 

The idea is: I change in one place.. and it reflects in several other filters. Any ideas @Stephen Wright _Elabor8_ 


Log in or Sign up to comment

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you