Forums

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

JQL works with "m" but not "h".

William Negley January 9, 2023

I have a scheduled automation which runs a JQL search.  The intent is to identify issues which have been in a certain status for more than 12 hours.  It then triggers a slack push notification.  I use the following JQL "status = "To Be Reviewed" AND status was "To Be Reviewed" before -12h" and run it every 5 minutes.  When I test the automation by setting the time to "before -1m", it runs fine.  When I change nothing but that field to -12h, we never get the push notification.  Can't figure this out....  welcome help!

2 answers

0 votes
Walter Buggenhout
Community Champion
January 9, 2023

Hi @William Negley,

Run that query as a separate JQL filter to see what results you are getting. There is nothing wrong with your syntax (tested exactly the same in a test instance, which return a few dozens of results and was updated when I extended to more hours).

But make sure that your query does return issues.

On the other hand - if you run this query every 5 minutes against a span of 12 hours, you risk creating lots of duplicate messages in your slack channel, unless long standing issues get picked up very fast as a result. 

William Negley January 9, 2023

When I "validate query" in the automation screen, it finds them all (118).  Then I have "Only include issues that have changed since the last time this rule executed" turned on so (theoretically?) it only returns those issues which are "new"?

 

I can't figure why if the query validates, we don't get the slack notification when it's set to hours, but when I set to minutes we get it.  Shouldn't impact it at all...

Walter Buggenhout
Community Champion
January 9, 2023

Try what happens if you turn that option off. It does not return issues that are new, as it says it returns issues that have changed since your rule has run for the last time. Since you are basically searching for issues that have not changed (they are in the same status for over 12 hours because no one has touched them), that might be your problem.

William Negley January 10, 2023

This remains a very strange issue.  Somehow the switch from "-1m" to "-12h" (all else remaining the same) impacts the push to Slack.  It works as expected consistently when set to -1m.  Then I shift to -12h and it doesn't push.  I'm changing to -720m to see if that does something...

0 votes
Alex Koxaras -Relational-
Community Champion
January 9, 2023

Hi @William Negley 

I'm not so sure that you can use "before" with time. According to the documentation "before" must be used with a date.

William Negley January 9, 2023

The query validates.... Would it still cause a problem?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events