Using updated field in JQL query for automation

Andrew Graves May 17, 2023

I created an automated query where it states whenever this ticket is in a specific status and the ticket has not been updated more than 30 days, this ticket shall be marked completed with a comment: "No response from a client".

Below is the query:
status = "Resolved by Tech" AND updated <= "-30d"

For some reason, Jira Software automatically mark the ticket as completed with a comment once the status is set to "Resolved by Tech" and the ticket has been updated way less than 30 days.

What's wrong with this query?

1 answer

0 votes
JM Perrot
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2023

Hello @Andrew Graves 

If you want track issues without updates since 30 days or more maybe you should query :

updated >= 30d

So your query should be : status = "Resolved by Tech" AND updated >= 30d

Let me know if my answer is right or if I misunderstood something :)

Andrew Graves May 17, 2023

I tried that and still get the same outcome. 

JM Perrot
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2023

You get the same outcome when you inverse the sign, that strange.

You already tried :

status = "Resolved by Tech" AND updated <= startOfDay(-30d) ?

Maybe you can try UpdatedDate <= -30d too (my bad, for my, your first query is working well)

Else if it's a bug from Jira, you can try to create a new filter (if you use it in a board or I don't know)

Andrew Graves May 17, 2023

I haven't tried using "startOfDay" in the query yet.  I just added it in another Jira project for testing and see how that goes with a test query showing this (see below):

status = "Resolved by Tech" AND updated < startOfDay("-1d") ?

JM Perrot
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2023

Nice, let me know if this function works in your case, I'm curious.

startOfDay(-1) will return, in theory, all issues of yesterday. If you want to include today, you can switch for endOfDay(-2) (or -1, I don't remember)

Andrew Graves May 19, 2023

So far it does look like it is working.  I need to do additional testing to confirm for sure.

Like JM Perrot likes this

Suggest an answer

Log in or Sign up to answer