The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Difference between using "-1D" and "1D" in JQL

Scott McDonald
Contributor
July 20, 2022

New to advanced JQL here - hoping you can help me with this question.  When I want to use the days syntax, what is the difference between using "-1D" and "1D"?

 

For instance, my full JQL is issuetype = "Hardware Refresh" AND status changed FROM OPEN TO ("Awaiting Shipping Notification") AFTER "1D", but it's not returning anything, even though the status on the ticket was changed yesterday.

issuetype = "Hardware Refresh" AND status changed FROM OPEN TO ("Awaiting Shipping Notification") AFTER "-1D" does return that ticket. 

 

Thank you in advance,
Scott

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Jack Brickey
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 Champions.
July 20, 2022

"1D" is interpreted as "+1d" so in your instance it would be looking into the future which would not be deterministic here. I believe you are looking for "-1d" here  but  it depends on your actual goal.

Jack Brickey
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 Champions.
July 20, 2022

You might find the following documentation useful as well - what-is-advanced-searching-in-jira-cloud 

Like # people like this
Scott McDonald
Contributor
July 21, 2022

Thank you @Jack Brickey 

 

With Automation, I'm looking to add a comment 10 days after the issue is transitioned from Open to status "Awaiting Shipping Notification".


Scott

Jack Brickey
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 Champions.
July 21, 2022

So you would need to create a custom date field to 'record' the date the issue enters the ASN status. This would be done with one rule triggered by transitioning to ASN. Then the second rule would be for adding the comment if the 'entered ASN' date is 10d > created date. Note I'm assuming that the created date works here as the starting point for open status.

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events