Forums

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

Help needed in JQL for condition query

Albert Arul Prakash Rajendran September 28, 2021

Team,

Following is my requirement. 

I have stories with say following statuses: Inception, Discovery, Elucidation, grooming, ready for development. my new sprint starts from say 18th october. 

I need a query that list down all stories that are in Inception, discovery Elucidation, grooming statuses and are targeted for 18th October sprint 

I have a custom field named targeted to denote the target. 

Basically, all stories that are not yet groomed with team before 2 weeks to the start of sprint. 

if speaking in programming terms 

if (today > sprint start date - 2 weeks) then

            List all stories that are in status inception, discovery, elucidation and grooming)

else

       Do nothing

How can i construct such JQL. Any ideas

1 answer

0 votes
Piyush_Annadate
Contributor
September 28, 2021

Hi,
Lets breakdown your requirements:

1. Issue type should be Story

JQL: type=Story

2. Status in the provided list.

JQL: status in (Inception, Discovery, Elucidation, grooming, ready for development)

3. Target for specific date:

JQL: targeted="2021/10/18"

Format for Date: 'yyyy/MM/dd HH:mm', 'yyyy-MM-dd HH:mm', 'yyyy/MM/dd', 'yyyy-MM-dd',

4. let's say issues created before that Sprint Start date:

created<sprintStartDateOf("Sprint 1") 

 

That totals to:

JQL: type=story and status in (Inception, Discovery, Elucidation, grooming, ready for development) and created<sprintStartDateOf("Sprint 1") 

OR

type=story and status in (Inception, Discovery, Elucidation, grooming, ready for development) and targeted="2021/10/18"

 

 

Do check out JQL Cheat Sheet at https://jirasupport.files.wordpress.com/2019/07/atlassian-jql-cheat-sheet-2.pdf

Bill Sheboy
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.
September 29, 2021

Hi @Piyush_Annadate and @Albert Arul Prakash Rajendran 

FYI the function sprintStartDateOf() only appears to be available with a marketplace addon and is not a built-in feature of Jira Server's JQL: https://marketplace.atlassian.com/apps/31399/jql-tricks-plugin?tab=overview&hosting=server

@Albert Arul Prakash Rajendran if you do not have that app, please check with your site admin if you have any similar addons for JQL to help.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer