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

1 vote
Jack Brickey
Community Champion
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
Community Champion
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
Community Champion
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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events