Forums

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

JQL Query

Harry Bob
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.
February 17, 2020

Hello,

 

I added a transition from 'Completed' to 'Waiting for Support'.

 

However I only want to allow this to happen IF its been in 'Completed' for less than 1 week.

 

What function would I use for that? This is what I have done so far

Snip20200218_302.png

 

Snip20200218_304.png

 

1 answer

1 accepted

0 votes
Answer accepted
Avinash Bhagawati _Appfire_
Community Champion
February 17, 2020

Hi @Harry Bob ,

Please add additional JQL query like below and automate the same with automation rules.

project=ABC AND status=Completed AND status changed BEFORE -1w

Thanks,

Avinash

Harry Bob
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.
February 17, 2020

Thanks @Avinash Bhagawati _Appfire_ ! If I want to use hours or minutes. Do I use hr and min?

Avinash Bhagawati _Appfire_
Community Champion
February 17, 2020

Yes @Harry Bob .

For hour,

project=ABC AND status=Completed AND status changed BEFORE -1h

For Minutes,

project=ABC AND status=Completed AND status changed BEFORE -30m

Thanks,

Avinash

Harry Bob
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.
February 17, 2020

Hi @Avinash Bhagawati _Appfire_ 

 

Tring to understand what the '-' means? Whats the difference between 'BEFORE -30m' and 'BEFORE 30m'

 

Thanks! :)

Avinash Bhagawati _Appfire_
Community Champion
February 18, 2020

Hi @Harry Bob ,

- indicates negative and that is for example 

project = ABC AND created >= -3d

above query indicates issues that are created in 3 days ago.

Please refer below document for advance searching in Jira.

https://confluence.atlassian.com/jirasoftwareserver0713/advanced-searching-fields-reference-965542859.html

 

Thanks,

Avinash 

Like Deleted user likes this
Harry Bob
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 2, 2020

Hi @Avinash Bhagawati _Appfire_ 

 

Why did you use the -3d?

 

Can't you just use

 

>= 3d should mean greater or equal to 3 days

 

so does that mean 

 

>= -3d means greater than or equal to negative 3 days??

 

Couldn't you just use 

 

<= 3d should mean less than or equal to 3 days 

 

Avinash Bhagawati _Appfire_
Community Champion
March 4, 2020

Hi @Harry Bob ,

Thanks for your reply here !

These 3d and -3d are works relatively in JQL queries.

For example.

Created >= -3d , In this query the the date refers will go the 3days before of your current date. So it list outs the issues that created in last three days eg say 10 issues.

 

Created <= 3d , In this query the the date refers will go the 3days before of your current date. So it list outs the issues that created in before last three days eg say 1000 issues.

 

Created >= 3d In this query the the date refers will go the 3days further of your current date. It sounds in jql like you are getting issues list that are created after 3days of your current date and result should be ZERO as you can not create jira issues with further dates.

Hope this understands you better and please try to JQL query in search navigation & you will be the difference !

Thanks,

Avinash

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events