Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a JQL for stories created last 5 days

Bryan Weimerskirch August 22, 2019

I am trying to prevent scope creep with my client. Majority of the time they will add new stories to the board and can be difficult to track. We are working on a rather large project and we decided to use components to organize the board.

Users will create a story and add the component so that the story will populate on our swim lane. 

I know that 2 stories were created this week but when I write my JQL it is bringing back 20 plus stories. Im not sure why it is doing that. See JQL below.

project = AMPS AND issueType in (Story, Bug) AND component = "2019 Remaining" OR component = "SO - BUCKET" AND created = "-5d"

Thanks

3 answers

1 accepted

0 votes
Answer accepted
Manon Soubies-Camy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 22, 2019

Hi @Bryan Weimerskirch and welcome to Community!

Can you try the following query instead:

project = AMPS AND issueType in (Story, Bug) AND (component = "2019 Remaining" OR component = "SO - BUCKET") AND created >= -5d

You could also use this one if you want to work within the current week:

project = AMPS AND issueType in (Story, Bug) AND (component = "2019 Remaining" OR component = "SO - BUCKET") AND created >= startOfWeek()

Hope this helps,

- Manon

Bryan Weimerskirch August 22, 2019

Hey Manon! I tried both of those and my results come back with 61 stories now. 

Manon Soubies-Camy
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 22, 2019

Re-reading your initial post, you may need to remove the Bugs from your query. So it would be:

project = AMPS AND issueType = Story AND component in ("2019 Remaining","SO - BUCKET") AND created >= startOfWeek()

Thanks @Sid for reminding us to use component in (xx,xx)!

Like # people like this
Bryan Weimerskirch August 22, 2019

Awesome! Thank you so much, this worked! 

Like Manon Soubies-Camy likes this
0 votes
Michael Kuhl {Appfire}
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.
August 22, 2019

Hi @Bryan Weimerskirch 

Consider changing your created = "-5d" clause to one of these:

  • created >= -5d
  • created >= startOfWeek()
Bryan Weimerskirch August 22, 2019

Thanks Michael I have tried that as well but still 20 plus stories.

0 votes
Sid
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.
August 22, 2019

Try this 

project = AMPS AND issuetype in (Bug, Story) AND component in (2019 Remaining, SO - BUCKET) AND created >= "-5d"

Bryan Weimerskirch August 22, 2019

Thanks for getting back but JIRA does not accept this JQL.

Sid
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.
August 22, 2019

Ya, you may need to add the "" for components. 

project = AMPS AND issueType = Story AND component in ("2019 Remaining","SO - BUCKET") AND created >= -5d

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events