Help with JQL query for subtasks with a due date less than 2 days

Raeeq Osman February 9, 2018

Hi everyone,

I'm trying to create a quick filter for my team members to use where you can see a list of subtasks assigned to that person with a due date less than or equal to 2 days.

This is what I had written out but doesn't appear to be working:

assignee = currentUser() AND issuetype = Sub-task AND duedate <= -2d

Greatly appreciate any help!

Best,

Raeeq

2 answers

1 vote
Deleted user March 13, 2019

assignee = currentUser() AND issuetype = Sub-task AND due >= "0" AND due <= 2d

Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2019

When I converted a basic search into advanced and saw due <= "0" I realize Jira counts negative time.

1 vote
Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2018

Raeeq,

-2d is looking in the past days you have to have +2d

assignee = currentUser() AND issuetype = Sub-task AND duedate >= 2d

Raeeq Osman February 12, 2018

Fadoua,

Thanks for responding. Unfortunately, it still didn't seem to work. Please see the screenshots attached.

Pic 1 - I created two test subtasks with due dates of 2/13:

Test Subtasks - Pic 1.PNG

 

Pic 2 - The jquery filter I set up using what you provided:Quick Filter - Pic 2.PNG

 

Pic 3 - Shows that I received no results after setting up the filter:No Results - Pic 3.PNG

Let me know if I set something up incorrectly. Thank you again!

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2018

ok will check it

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

This is the query:

issuetype = Sub-task AND status in (Open, "In Progress") AND due <= 2d AND assignee in (currentUser())

For Status of course select the ones that you apply to your case

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

Once you select due date in your query, you should see a screen like the following:

Screen Shot 2018-02-13 at 7.18.44 AM.png

Raeeq Osman February 13, 2018

It still doesn't seem to be working. See screenshot below. When I enter "due" or due date" in my query, the options are what you see below, and I don't see the screen you provided. I wonder if it's because I'm using the cloud version of Jira and if queries have to be written differently?

Thank you for your continued patience and help with this issue.

Pic 1.PNG

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

Under the basic screen not the advanced try my query by selecting from the dropdown lists.

For JQL queries, being in Cloud or Server shouldn't be a problem

It is a pleasure assisting you until your issue gets resolved

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

The following is what you will need to use not the advanced link:

Screen Shot 2018-02-13 at 12.07.28 PM.png

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

Click on "More" then type DueDate

You should get a screen like the one I sent you earlier.

Raeeq Osman February 13, 2018

Perfect! It worked.

Now the issue I'm having though is being able to have the rest of my team members have access to that filter so they can see their own subtasks. We primarily work out of the Backlog page of our project. Is there a way to have the filter viewable from there or where will they need to navigate to in order to use that filter?

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

Great!

Now save your filter by clicking on what I circled in Red:

Save as.png

Then Click "Submit"

Test Filter.png

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

Sorry I couldn't add more screenshot

Once you click "Submit" on your next screen look at the top by your Filter's name then click on "Details" like the following screen:

Details.png

Your screen should look like the following:

Permissions.png

The Subsequent is what you should see:

Shares.png

 

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2018

Add shares is where you can decide who to share the filter with.

You can also add the quick filter to your backlog by "configuring the board". You can add the JQL query on the following screen:

Screen Shot 2018-02-13 at 8.12.14 PM.png

Let me know how it goes or if you need additional assistance.

Raeeq Osman February 14, 2018

So I copied the query from here (it works when I use it here):

Picture 1:

Pic 1.PNG

Then pasted it into a Quick Filter query:

Picture 2:

Pic 2.PNG

But when I go to the Backlog to select the Quick Filter, I don't see any results:

Pic 3.PNG

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2018

You mean when you click on "My Sub-tasks - Due Date < 2d" it doesn't display anything? Because you have to select it in order to see the issues on the backlog

Raeeq Osman February 14, 2018

The last picture is the results after I already selected the filter.

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2018

I know it may sound silly did you make sure that you copied everything from the JQL query?

Raeeq Osman February 14, 2018

I thought I made that mistake too! But I actually made sure to resave it again just now with the full query copied over and it still doesn't work.

This is a lot to ask but could you try copying this query and creating a Quick Filter for yourself? And also create some test stories with sub-tasks underneath and the due date as either 2/15 or 2/16?

Query:

issuetype = Sub-task AND status in ("In Progress", "To Do") AND due >= 1d AND due <= 2d AND assignee in (currentUser()) ORDER BY updated DESC

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2018

Ok I will try it. It is a pleasure assisting you with this issue. Sorry yesterday wasn't feeling well. Logged off early.

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2018

I did create a filter and created Sub-tasks as well with Due Dates 2/16 and 2/17. Below is my JQL query

issuetype = Sub-task AND status = "In Progress" AND due <= 2d AND assignee in (currentUser()) ORDER BY updated DESC

I named my Quick Filter: Due within 24 Hours and it worked

My quick filter.png

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2018

Are your Sub-tasks already added to an active sprint?

Raeeq Osman February 16, 2018

So it appears that when I'm under the "Active Sprints" tab, the filter does appear to work and shows the two sub-tasks I created.

Picture 1:

Pic 1.PNG

 

However, when I'm in the "Backlog" tab and try using it, then the filter doesn't seem to work, which I guess isn't that big of a deal. Maybe there's some kind of system issue not allowing the filter to work in that tab.

Picture 2:

Pic 2.PNG

 

I even tried creating a very basic filter to just show me all Sub-tasks (issuetype = Sub-task) in the Backlog and that didn't work either. So I think the problem might be just the Backlog being unable to show Sub-tasks because the filter worked when I changed it to show other issue types (Bug, User Story, Epic, Task).

Picture 3:

Pic 3.PNG

 

So really it's not that big of an issue. I can just let my team members know to use the filter in the Active Sprints tab, whenever we start a new sprint.

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2018

Actually Sub-tasks don't show on a backlog if that will help. JIRA doesn't work that way there is a turn around I can find it for you because i did it in the past but it wont show details about the sub-task

Suggest an answer

Log in or Sign up to answer